From cdd3585bda2e01fc7245a19ac41fe912d8dc6a3c Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 5 Aug 2018 18:17:35 -0400 Subject: make a certificate expire a few years in the future, fixes doctests (#4383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- docs/x509/reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/x509') diff --git a/docs/x509/reference.rst b/docs/x509/reference.rst index bc3dd556..5fa8471b 100644 --- a/docs/x509/reference.rst +++ b/docs/x509/reference.rst @@ -615,7 +615,7 @@ X.509 Certificate Builder ... 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( -- cgit v1.2.3