-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for S/MIME working group ballot SMC-08 (#101)
* Validate A-label restriction on SMTPUtf8Mailboxes per RFC 9598 * Add prohibition on issuance of legacy generation S/MIME certificates * Add citation comments to new findings
- Loading branch information
Showing
11 changed files
with
160 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import datetime | ||
|
||
from pyasn1_alt_modules import rfc5280 | ||
|
||
from pkilint import validation, document | ||
|
||
|
||
class LegacyGenerationSunsetValidator(validation.Validator): | ||
""" | ||
SMBR, section 7.1.6.1: | ||
Effective July 15, 2025 S/MIME Subscriber Certificates SHALL NOT be issued using the Legacy Generation profiles | ||
2.23.140.1.5.1.1, 2.23.140.1.5.2.1, 2.23.140.1.5.3.1, or 2.23.140.1.5.4.1. | ||
""" | ||
VALIDATION_LEGACY_GENERATION_CERTIFICATE_ISSUED_AFTER_PROHIBITION = validation.ValidationFinding( | ||
validation.ValidationFindingSeverity.ERROR, | ||
'cabf.smime.legacy_generation_certificate_issued_after_prohibition' | ||
) | ||
|
||
_LEGACY_GENERATION_SUNSET_DATE = datetime.datetime(2025, 7, 15, 0, 0, 0, tzinfo=datetime.timezone.utc) | ||
|
||
def __init__(self, validity_period_start_retriever: document.ValidityPeriodStartRetriever): | ||
super().__init__( | ||
validations=[self.VALIDATION_LEGACY_GENERATION_CERTIFICATE_ISSUED_AFTER_PROHIBITION], | ||
pdu_class=rfc5280.Validity | ||
) | ||
|
||
self._validity_period_start_retriever = validity_period_start_retriever | ||
|
||
def validate(self, node): | ||
if self._validity_period_start_retriever(node.document) >= self._LEGACY_GENERATION_SUNSET_DATE: | ||
raise validation.ValidationFindingEncountered( | ||
self.VALIDATION_LEGACY_GENERATION_CERTIFICATE_ISSUED_AFTER_PROHIBITION | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
tests/integration_certificate/pkix/smtputf8mailbox_ulabel_domain_part.crttest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIGJjCCBA6gAwIBAgIUVVqfvGiErUkRzwZ09xzjZpwLC0QwDQYJKoZIhvcNAQEL | ||
BQAwSDELMAkGA1UEBhMCVVMxHzAdBgNVBAoMFkZvbyBJbmR1c3RyaWVzIExpbWl0 | ||
ZWQxGDAWBgNVBAMMD0ludGVybWVkaWF0ZSBDQTAeFw0yMzA0MTkwM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BleGFtcGxlLmNvbaAnBggrBgEFBQcICaAbDBnljLvnlJ9A | ||
5aSn5a2mLmV4YW1wbGUuY29tpE0wSzEjMCEGA1UEYRMaTEVJWEctQUVZRTAwRUtY | ||
RVNWWlVVRUJQNjcxJDAiBgNVBAoMG+OCouOCr+ODn+W3pealreagquW8j+S8muek | ||
vjAjBgkrBgEEAYOYKgEEFhMUQUVZRTAwRUtYRVNWWlVVRUJQNjcwDQYJKoZIhvcN | ||
AQELBQADggIBAFVF5H7vBBmRJlAIdSDcAghTDfPfMg0f5D+cFs4SQUJxcS+YePJa | ||
+xd39vpSQktHrRsUjqU0jr54iFU/AmMM2d+QFUv+1dL5bCTZP2obq2A95LtCBKPZ | ||
lNGf+wb/DzKJSrNazTW2dL1Fx6GZX5ixfduyI6KAhBwGMEZnlrXJlsZah4Bl1RR8 | ||
K4gabGQhaZBsnw+Lr6blp/6gTr+2+c3SVO/7j/Sh64QCwy5qT6FLnYBiiErY/JJV | ||
J39EYYlY60LDQx25UVsGeXw6Y96VJSz4gbQqSnM4NbF+02+K4XT2l2q9tx9Y+lm2 | ||
U2qeW2UgLoTqnDTzeYwO79AvnHEG2qDrvhcB59myJbXsAUblyTCVgaygJ5VS2q63 | ||
PpBO3YXllBYjwMWyD5R9Tmmq9IvDWNQQBo19wEIKInsml/K5TKpn0EsldsMzy9wd | ||
ubLnaIkqPm47+ZOCGlpadFtnPzXOYnn2YS4UbpcJlWhVc5Wq2S+ok4ayqfjy3gcD | ||
3lXYsGXWzJNDeg5be49w1kqC6vWl1Wj4amgBq0VHA97B55W22xcwDqZ3FWRqi609 | ||
efbypy8HVZqDX7zCRDrPAcv6qni4jMZX25k462Kl+SxNn1c1jcoq1Pz8QHs1078Y | ||
mdERsaRMUlq2ikE7tOQLL7AJ0GMWGpQnd797sMdNrGJ24SXXJIUxCXRB | ||
-----END CERTIFICATE----- | ||
|
||
node_path,validator,severity,code,message | ||
certificate.tbsCertificate.extensions.3.extnValue.subjectKeyIdentifier,SubjectKeyIdentifierValidator,INFO,pkix.subject_key_identifier_method_1_identified, | ||
certificate.tbsCertificate.extensions.8.extnValue.subjectAltName.1.otherName.value.smtpUTF8Mailbox,SmtpUTF8MailboxValidator,ERROR,pkix.smtp_utf8_mailbox_domain_part_invalid_syntax, |
38 changes: 38 additions & 0 deletions
38
tests/integration_certificate/smime_br/individual/legacy/issued_after_legacy_sunset.crttest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIF1DCCA7ygAwIBAgIUL745jJJYnvMFGPE42o7ukLDYP/IwDQYJKoZIhvcNAQEL | ||
BQAwSDELMAkGA1UEBhMCVVMxHzAdBgNVBAoMFkZvbyBJbmR1c3RyaWVzIExpbWl0 | ||
ZWQxGDAWBgNVBAMMD0ludGVybWVkaWF0ZSBDQTAeFw0yNjA0MjgwMDAwMDBaFw0y | ||
NzA3MjcyMzU5NTlaMEIxFjAUBgNVBAMMDVlBTUFEQSBIYW5ha28xKDAmBgkqhkiG | ||
9w0BCQEWGWhhbmFrby55YW1hZGFAZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEB | ||
AQUAA4IBDwAwggEKAoIBAQCw+egZQ6eumJKq3hfKfED4dE/tL4FI5sjqont9ABVI | ||
+1GSqyi1bFBgsRjM0THllIdMbKmJtWwnKW8J+5OgNN8y6Xxv8JmM/Y5vQt2lis0f | ||
qXmG8UTz0VTWdlAXXmhUs6lSADvAaIe4RVrCsZ97L3ZQTryY7JRVcbB4khUN3Gp0 | ||
yg+801SXzoFTTa+UGIRLE66jH51aa5VXu99hnv1OiH8tQrjdi8mH6uG/icq4XuIe | ||
NWMF32wHqIOOPvQcWV3M5D2vxJEj702Ku6k9OQXkAo17qRSEonWW4HtLbtmS8He1 | ||
JNPc/n3dVUm+fM6NoDXPoLP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||
9S98J461+qYfZuxIoFp1HCXtJs1iZ2HPuz7sma+vUtd9s4S9OWGruyDkxZlClcZ+ | ||
IgH7MZYnvByo3XZd+c3jk6692bqEYBgvu5tWrId4h9hVh7TY4pbKwwZnFojPLkHH | ||
2OMkjJqK54R/PS3Ea0V8vInxwr8ESmLo/DZUuUNaX82UOkOXd2wwhHexlVtZM5Hs | ||
IVDZxDulQS1lll+M6vAzHq9buxAdkRAiyC5X+dSqkP5itNCQBkJrnfi8tVfHg69X | ||
APeclV11R1Ksnjn6OjwAKBmWnU99HzScksMx0SOI5G99+6mzz3zZLVQdPlnSj5V+ | ||
tgkVdJ0YdSw= | ||
-----END CERTIFICATE----- | ||
|
||
node_path,validator,severity,code,message | ||
certificate.tbsCertificate.validity,LegacyGenerationSunsetValidator,ERROR,cabf.smime.legacy_generation_certificate_issued_after_prohibition, | ||
certificate.tbsCertificate.extensions.3.extnValue.subjectKeyIdentifier,SubjectKeyIdentifierValidator,INFO,pkix.subject_key_identifier_method_1_identified, |