Cache encodings for read-only objects. This is needed not so much for performance reasons, but ...
10 years, 5 months ago
(2013-11-28 17:22:05 UTC)
#1
Cache encodings for read-only objects.
This is needed not so much for performance reasons, but as a workaround to
handle non-strict encodings: when we have a read-only object that was encoded in
some non-kosher way, the user will expect to get the original encoding back. For
example, in the case of certificates, the signature will not validate unless we
verify it over the original serialized TBSCertificate.
Previously this was handled by caching the encoding in the Certificate wrapper
class but moving it here allows us to expose mutable ASN.1 components through
the wrapper without worrying about the cached encoding getting out of sync.
I've also improved test coverage for mutable types and fixed a silly syntax bug
as a result.
LGTM https://codereview.appspot.com/34780045/diff/1/src/python/ct/crypto/asn1/types.py File src/python/ct/crypto/asn1/types.py (right): https://codereview.appspot.com/34780045/diff/1/src/python/ct/crypto/asn1/types.py#newcode1323 src/python/ct/crypto/asn1/types.py:1323: self._value[key] = value Is this intentional? I assume ...
10 years, 5 months ago
(2013-11-28 20:54:37 UTC)
#2
Issue 34780045: Cache encodings of read-only ASN.1 objects
Created 10 years, 5 months ago by ekasper
Modified 10 years, 5 months ago
Reviewers: Eran
Base URL:
Comments: 2