Skip to content

Commit

Permalink
OSSM-3365 Added X509_get_key_usage()
Browse files Browse the repository at this point in the history
Signed-off-by: Ted Poole <tpoole@redhat.com>
  • Loading branch information
tedjpoole committed Jun 27, 2023
1 parent 68a1ec8 commit 727d2c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions bssl-compat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ target_add_bssl_function(bssl-compat
X509_get_ext
X509_get_ext_by_OBJ
X509_get_ext_d2i
X509_get_key_usage
X509_get_serialNumber
X509_get_X509_PUBKEY
X509_get0_notAfter
Expand Down
6 changes: 4 additions & 2 deletions bssl-compat/patch/include/openssl/x509v3.h.patch
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,17 @@

// DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS)
// DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS)
@@ -857,7 +861,7 @@
@@ -857,8 +861,8 @@
// OPENSSL_EXPORT int X509_check_issued(X509 *issuer, X509 *subject);
// OPENSSL_EXPORT int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid);

-// OPENSSL_EXPORT uint32_t X509_get_extension_flags(X509 *x);
-// OPENSSL_EXPORT uint32_t X509_get_key_usage(X509 *x);
+OPENSSL_EXPORT uint32_t X509_get_extension_flags(X509 *x);
// OPENSSL_EXPORT uint32_t X509_get_key_usage(X509 *x);
+OPENSSL_EXPORT uint32_t X509_get_key_usage(X509 *x);
// OPENSSL_EXPORT uint32_t X509_get_extended_key_usage(X509 *x);

// X509_get0_subject_key_id returns |x509|'s subject key identifier, if present.
@@ -958,29 +962,29 @@
// made after this point may be overwritten when the script is next run.

Expand Down
3 changes: 2 additions & 1 deletion bssl-compat/patch/include/openssl/x509v3.h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

sed -i -e 's|^// \(#[ \t]*define[ \t]*\)\(X509V3_R_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$|#ifdef ossl_\2\n\1\2 ossl_\2\n#endif|g' \
-e 's|^// \(#[ \t]*define[ \t]*\)\(GEN_[A-Z0-9_]*\)[^a-zA-Z0-9_].*$|#ifdef ossl_\2\n\1\2 ossl_\2\n#endif|g' \
-e 's|^// \(#[ \t]*define[ \t]*\)\(EXFLAG_[A-Z0-9_]*\)[^a-zA-Z0-9_].*$|#ifdef ossl_\2\n\1\2 ossl_\2\n#endif|g' "$1"
-e 's|^// \(#[ \t]*define[ \t]*\)\(EXFLAG_[A-Z0-9_]*\)[^a-zA-Z0-9_].*$|#ifdef ossl_\2\n\1\2 ossl_\2\n#endif|g' \
-e 's|^// \(#[ \t]*define[ \t]*\)\(KU_[A-Z0-9_]*\)[^a-zA-Z0-9_].*$|#ifdef ossl_\2\n\1\2 ossl_\2\n#endif|g' "$1"

0 comments on commit 727d2c7

Please sign in to comment.