Commit 1f180ff8 authored by Jorge Lopez Silva's avatar Jorge Lopez Silva Committed by Facebook Github Bot

Add shim for void X509_STORE_CTX_set0_verified_chain.

Summary:
In order to set the verified chain of a X509 store we need to be able to use X509_STORE_CTX_set0_verified_chain both for openssl 1.1.0 and previous versions.

Proxygen needs this to complete the clang/platform007 upgrade.

Reviewed By: Orvid

Differential Revision: D14894384

fbshipit-source-id: 378eb834b077469b666ad303f28f54af5caff990
parent c1527c03
......@@ -64,6 +64,13 @@ int X509_up_ref(X509* x) {
return CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509);
}
void X509_STORE_CTX_set0_verified_chain(
X509_STORE_CTX* ctx,
STACK_OF(X509) * sk) {
sk_X509_pop_free(ctx->chain, X509_free);
ctx->chain = sk;
}
int X509_STORE_up_ref(X509_STORE* v) {
return CRYPTO_add(&v->references, 1, CRYPTO_LOCK_X509_STORE);
}
......
......@@ -118,6 +118,9 @@ int SSL_CTX_up_ref(SSL_CTX* session);
int SSL_SESSION_up_ref(SSL_SESSION* session);
int X509_up_ref(X509* x);
int X509_STORE_up_ref(X509_STORE* v);
void X509_STORE_CTX_set0_verified_chain(
X509_STORE_CTX* ctx,
STACK_OF(X509) * sk);
int EVP_PKEY_up_ref(EVP_PKEY* evp);
void RSA_get0_key(
const RSA* r,
......
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