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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 22 20:16:04 PDT 2019


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

--- Comment #30 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Alex Christensen from comment #29)
> Comment on attachment 374451 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=374451&action=review
> 
> > Source/WTF/wtf/persistence/PersistentCoders.h:153
> > -        encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(vector.data()), vector.size() * sizeof(T), alignof(T));
> > +        encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(vector.data()), vector.size() * sizeof(T));
> 
> Why does this no longer match ArgumentCoders.h? Why did you make this change?

ArgumentCoders.h and PresistentCoders.h are alike but they are unrelated.
Because they are separated by namespace, changing PersistentCoders doesn't affect ArgumentCoders.

This change aimed to use Persistence::VectorCoder to simplify code.
Before the change, argument number of Persistence::Encoder::encodeFixedLengthData was wrong but this template function didn't raise compile errors as it is not reffered anywhere and didn't raise compile errors.

> > Source/WebCore/platform/network/curl/CertificateInfo.h:84
> > +    static bool decode(Decoder& decoder, WebCore::CertificateInfo& certificateInfo)
> 
> Please use modern decoding that returns an
> Optional<WebCore::CertificateInfo>. Decoders that return a bool prevent us
> from removing default constructors in decodable classes.

Other ports use PersistentDecoders for encoding/decoding certificates too and replacing coder affects other ports.
Should we replace PersistentCoders by ArgumentCoders or something modern coder?

> > Source/WebCore/platform/network/curl/OpenSSLHelper.cpp:56
> > +        if (*ptr)
> > +            OPENSSL_free(*ptr);
> 
> How do we know there will only be one thing needing OPENSSL_free here?

Do you mean we should consider not only buffer we got from ASN1_STRING_to_UTF8other but also other type objects we have to free with OPENSSL_free?

-- 
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/20190723/91621e83/attachment-0001.html>


More information about the webkit-unassigned mailing list