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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 12 11:50:07 PDT 2019


Alex Christensen <achristensen at apple.com> changed:

           What    |Removed                     |Added
                 CC|                            |achristensen at apple.com
 Attachment #373889|review?                     |review-
              Flags|                            |

--- Comment #22 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 373889
  --> https://bugs.webkit.org/attachment.cgi?id=373889

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.

> 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...

> 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.

> 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

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/20190712/b0bfc790/attachment-0001.html>

More information about the webkit-unassigned mailing list