-
Notifications
You must be signed in to change notification settings - Fork 38
Move X.509 OIDs out of crypto #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Move X.509 OIDs out of crypto #252
Conversation
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
Move the corresponding declarations from tf-psa-crypto/include/mbedtls/oid.h to library/x509_internal.h. Signed-off-by: Gilles Peskine <[email protected]>
OID_INFO_STRINGS is always disabled when oid_definition_helpers.h is consumed inside TF-PSA-Crypto. In Mbed TLS, it is enabled when X.509 wants text information. Signed-off-by: Gilles Peskine <[email protected]>
Crypto never associates strings to OIDs. Signed-off-by: Gilles Peskine <[email protected]>
@@ -470,39 +443,6 @@ | |||
extern "C" { | |||
#endif | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note for potential future improvements: the functions declared here are only used inside TF-PSA-Crypto, except mbedtls_oid_get_md_alg()
which is also used in X.509 and PKCS7 in Mbed TLS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually mbedtls_oid_get_md_alg()
is not used in crypto! It's only called from test_suite_md
which validates the OID associated with each hash algorithm. So mbedtls_oid_get_md_alg()
should move to X.509 as well.
Move the definitions of OIDs that are only needed X.509 out of
oid.c
andoid.h
out of TF-PSA-Crypto, and into the X.509 library in Mbed TLS.Note: this pull request does not work against the head of Mbed TLS. After it is merged, TF-PSA-Crypto can only be consumed by an Mbed TLS where Mbed-TLS/mbedtls#10125 is merged. As a consequence, the TF-PSA-Crypto CI will fail. Arranging for a compatibility period would be doable, but quite a bit of extra work.
PR checklist
oid.h
isn't yet officially a private interface, but it will be)