Commit 5378e4c0 authored by Mingtao Yang's avatar Mingtao Yang Committed by Facebook Github Bot

portability/OpenSSL: Getters for extension flags and key usage

Reviewed By: ouj

Differential Revision: D7424982

fbshipit-source-id: 3190564d3e79d10d7d64c1822a53e058a201f87d
parent 1e71e4c0
......@@ -464,6 +464,18 @@ const ASN1_TIME* X509_REVOKED_get0_revocationDate(const X509_REVOKED* r) {
return r->revocationDate;
}
uint32_t X509_get_extension_flags(X509* x) {
return x->ex_flags;
}
uint32_t X509_get_key_usage(X509* x) {
return x->ex_kusage;
}
uint32_t X509_get_extended_key_usage(X509* x) {
return x->ex_xkusage;
}
#endif // !FOLLY_OPENSSL_IS_110
} // namespace ssl
} // namespace portability
......
......@@ -191,6 +191,10 @@ void OPENSSL_cleanup();
const ASN1_INTEGER* X509_REVOKED_get0_serialNumber(const X509_REVOKED* r);
const ASN1_TIME* X509_REVOKED_get0_revocationDate(const X509_REVOKED* r);
uint32_t X509_get_extension_flags(X509* x);
uint32_t X509_get_key_usage(X509* x);
uint32_t X509_get_extended_key_usage(X509* x);
#endif
#if FOLLY_OPENSSL_IS_110
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment