Skip to content

Add x509 Test Vectors with PrivateKeyUsagePeriod extension#12749

Merged
alex merged 6 commits intopyca:mainfrom
HamdaanAliQuatil:x509-vectors
Apr 10, 2025
Merged

Add x509 Test Vectors with PrivateKeyUsagePeriod extension#12749
alex merged 6 commits intopyca:mainfrom
HamdaanAliQuatil:x509-vectors

Conversation

@HamdaanAliQuatil
Copy link
Contributor

Add vectors to test support for PrivateKeyUsagePeriod in x509 certificates (introduced in #12738)

Comment on lines +626 to +633
* ``both_dates.pem`` - A certificate containing PrivateKeyUsagePeriod with both
``notBefore`` and ``notAfter`` fields set.
* ``both_dates.der`` - A certificate containing PrivateKeyUsagePeriod with both
``notBefore`` and ``notAfter`` fields set. DER encoded.
* ``only_notBefore.pem`` - A certificate containing PrivateKeyUsagePeriod with
only ``notBefore`` field set.
* ``only_notAfter.pem`` - A certificate containing PrivateKeyUsagePeriod with
only ``notAfter`` field set.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give these files slightly more descriptive names -- I suggest prepending private_key_usage_period_ to each of the current names

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated names of these files. Made corresponding changes to test path construction in the other PR: https://github.com/pyca/cryptography/blob/3f0ebd0baee387ddda2fa6dfa8dd86984e2b9f5e/tests/x509/test_x509_ext.py#L1990C5-L1993C10

@HamdaanAliQuatil HamdaanAliQuatil requested a review from alex April 9, 2025 20:59
Comment on lines +628 to +629
* ``private_key_usage_period_both_dates.der`` - A certificate containing
PrivateKeyUsagePeriod with both ``notBefore`` and ``notAfter`` fields set. DER encoded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry I should have noticed before, we don't need a vector in both PEM and DER for the same thing, one format is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed DER encoded key

@HamdaanAliQuatil HamdaanAliQuatil requested a review from alex April 10, 2025 03:17
HamdaanAliQuatil and others added 2 commits April 10, 2025 09:52
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
@HamdaanAliQuatil HamdaanAliQuatil requested a review from alex April 10, 2025 04:23
@alex
Copy link
Member

alex commented Apr 10, 2025

Thanks for your patience here!

@alex alex enabled auto-merge (squash) April 10, 2025 04:29
@alex alex merged commit 2ff9bc3 into pyca:main Apr 10, 2025
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants