Overall LGTM, few small comments. https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... File src/python/ct/crypto/asn1/x509_time.py (right): https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... src/python/ct/crypto/asn1/x509_time.py:43: if len(string_time) != 13 or string_time[-1] != "Z": Have a constant describing where '13' comes from. https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... src/python/ct/crypto/asn1/x509_time.py:80: if len(string_time) != 15 or string_time[-1] != "Z": This check is very similar to the one above, except for the expected length. Could they be generalized? https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/cert.py File src/python/ct/crypto/cert.py (right): https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/cert.p... src/python/ct/crypto/cert.py:47: def __cache_expiry(self): nit: Name this 'copy expiry' rather than cache expiry, since this object seems immutable (so there's no 'invalidation' of the 'cached' data)
Thanks for picking this up! I also ran linter on the new files, and am submitting now. https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... File src/python/ct/crypto/asn1/x509_time.py (right): https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... src/python/ct/crypto/asn1/x509_time.py:43: if len(string_time) != 13 or string_time[-1] != "Z": On 2013/08/23 08:20:47, Eran wrote: > Have a constant describing where '13' comes from. Done. https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/asn1/x... src/python/ct/crypto/asn1/x509_time.py:80: if len(string_time) != 15 or string_time[-1] != "Z": On 2013/08/23 08:20:47, Eran wrote: > This check is very similar to the one above, except for the expected length. > Could they be generalized? Even though the check is now exactly the same, I don't think it belongs in the base class (which is just an interface that doesn't know about the ASN.1 string rep) so I'm leaving it as is. https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/cert.py File src/python/ct/crypto/cert.py (right): https://codereview.appspot.com/12858048/diff/3001/src/python/ct/crypto/cert.p... src/python/ct/crypto/cert.py:47: def __cache_expiry(self): On 2013/08/23 08:20:47, Eran wrote: > nit: Name this 'copy expiry' rather than cache expiry, since this object seems > immutable (so there's no 'invalidation' of the 'cached' data) I think I prefer to leave it as is (in sync with __cached_der).