make a certificate expire a few years in the future, fixes doctests (#4383)
* make a certificate expire a few years in the future, fixes doctests
👋 to future alex when this test breaks in two years
* short lived certs are a good idea
diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst
index bc3dd55..5fa8471 100644
--- a/docs/x509/reference.rst
+++ b/docs/x509/reference.rst
@@ -615,7 +615,7 @@
... x509.NameAttribute(NameOID.COMMON_NAME, u'cryptography.io'),
... ]))
>>> builder = builder.not_valid_before(datetime.datetime.today() - one_day)
- >>> builder = builder.not_valid_after(datetime.datetime(2018, 8, 2))
+ >>> builder = builder.not_valid_after(datetime.datetime.today() + (one_day * 30))
>>> builder = builder.serial_number(x509.random_serial_number())
>>> builder = builder.public_key(public_key)
>>> builder = builder.add_extension(