[Webkit-unassigned] [Bug 191498] [Curl] implement CertificateInfo::summaryInfo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 19 02:02:15 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=191498

--- Comment #26 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Alex Christensen from comment #22)
> Comment on attachment 373889 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=373889&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        This patch makes WebInspector show summary of certificates.
> 
> This sounds good.
> 
> > Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp:104
> > +static Optional<Seconds> convertASN1TimeToSeconds(const ASN1_TIME* ans1Time)
> 
> I think things like this ought to go in OpenSSLHelper because it's specific
> to OpenSSL, not libCURL.  Also, there's a lot of custom parsing code here. 
> It would be good to minimize that.
> 

Thank you for your comments.
We moved it to OpenSSLHelper.cpp. 

> > Source/WebCore/platform/network/curl/OpenSSLHelper.h:41
> > +    X509Ref(::X509* x509, bool isOwner = true)
> 
> I think this design is lending itself to strange lifetime management bugs
> without a good reason...

Changed X509Ref more simpler.

> > Source/WebCore/platform/network/curl/OpenSSLHelper.h:107
> > +    X509Ref item(unsigned i) { return X509Ref { sk_X509_value(m_certs, i), false}; }
> 
> ... If this instead returned an X509* we wouldn't need this "sometimes an
> X509Ref points to something that something else manages" strangeness.

Changed to return X509*

> > Source/WebCore/platform/network/curl/OpenSSLHelper.h:181
> > +using Ptr = std::unique_ptr<T*, WTF::Function<void(T**)>>;
> 
> I don't think this is a good name.  I think each type should have its own
> pointer type.  This is what boringssl did, and what I did in
> https://trac.webkit.org/changeset/244568/webkit

We reconsidered names of unique pointers and changed.
Thank you for your advice! It was great help!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190719/d0d90f39/attachment-0001.html>


More information about the webkit-unassigned mailing list