-
Notifications
You must be signed in to change notification settings - Fork 623
Open
Description
StrongSwan contains a plugin for using Botan as a crypto provider for quite some time already. We're currently working on extending this plugin with functionality for parsing/validating X.509 certificates and CRLs. To access the relevant bits in Botan, a number of FFI functions have to be added. This issue is meant to provide an overview of the work in progress.
In the best-case scenario we'd like to have most of these additions available in the upcoming Botan 3.11.0 release so that we can start integrating this into strongSwan upstream. Locally, we already have a working prototype.
Required new Functionality in the FFI
- querying various data fields from certificates and CRLs (as applicable)
(made available via FFI: Generic getter(s) for X.509 objects #5188)- serial number
- subject/issuer DN as DER encoding
- subject/issuer key identifiers
- subject public key as PKCS#8 container
- "to be signed" data for signature validation
- the object's signature as raw bits
- the signature algorithm identifier as DER encoding
- CRL distribution point URLs
- OCSP responder URLs (see also X509: Multiple OCSP Responders #5231)
- basic/extended constraints
(made available via FFI: Allow querying more X.509 Certificate Constraints #5221)- is_CA bit
- path length constraint
- extended key usage bits
- subject/issuer alternative names
(see FFI: Query Certificate Subject/Issuer Alternative Names and Name Constraints #5217) - name constraint definitions
(see FFI: Query Certificate Subject/Issuer Alternative Names and Name Constraints #5217) - IP address range information (from the IPAddrBlock extension)
(see below for some existing unmerged code for this) - CRL validity interval (this update, next update)
(see FFI: Allow querying validity interval of X.509 CRLs #5222) - enumeration of individual CRL entries
(see FFI: Enumeration of entries in an X.509 CRL #5220)
Pull Requests related to this
- FFI: Generic getter(s) for X.509 objects #5188
- Fix Inconsistency of X509 Name Constraint Matching #5189
- FFI: Query Certificate Subject/Issuer Alternative Names and Name Constraints #5217
- FFI: Enumeration of entries in an X.509 CRL #5220
- FFI: Allow querying more X.509 Certificate Constraints #5221
- FFI: Allow querying validity interval of X.509 CRLs #5222
- X509: Multiple OCSP Responders #5231
- FFI: add
*_count()functions for some FFI enumerators #5232
Currently Known Limitations
- IPv6 addresses
Botan currently doesn't support handling IPv6 addresses in subject/issuer alternative names as well as name constraints. Any such IPv6 address entries would currently not be visible to strongSwan when using the Botan plugin - Delta-CRLs
To the best of my understanding Botan currently does not provide support for Delta CRLs. Therefore, we won't be able to support those via the strongSwan plugin either. - Enumerating multiple OCSP Responders
Currently,Botan::X509_Certificate::ocsp_responder()returns exactly one responder entry (from the AuthorityInformationAccess extension) but there's no way to access all responder URLs if the certificate lists more than one.
(addressed in X509: Multiple OCSP Responders #5231) - OCSP Response/Request
We don't require any OCSP-based certificate revocation checks at the moment. Integration with Botan's OCSP functionality is left for future work
/cc @tobiasbrunner
randombit
Metadata
Metadata
Assignees
Labels
enhancementEnhancement or new featureEnhancement or new feature