From 1af26e53bce7f075e27e2fa6a78764fa6620b8ab Mon Sep 17 00:00:00 2001 From: Andreas Schnebinger Date: Sat, 12 Oct 2019 18:48:40 +0200 Subject: Fix typo and create compatibility macro CLA:trivial Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/9472) --- apps/ts.c | 2 +- crypto/ts/ts_verify_ctx.c | 2 +- include/openssl/ts.h | 5 ++++- util/libcrypto.num | 2 +- util/missingcrypto.txt | 2 +- util/missingmacro.txt | 1 + 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/ts.c b/apps/ts.c index aef74adce8..b45c262789 100644 --- a/apps/ts.c +++ b/apps/ts.c @@ -921,7 +921,7 @@ static TS_VERIFY_CTX *create_verify_ctx(const char *data, const char *digest, /* Loading untrusted certificates. */ if (untrusted - && TS_VERIFY_CTS_set_certs(ctx, TS_CONF_load_certs(untrusted)) == NULL) + && TS_VERIFY_CTX_set_certs(ctx, TS_CONF_load_certs(untrusted)) == NULL) goto err; ret = 1; diff --git a/crypto/ts/ts_verify_ctx.c b/crypto/ts/ts_verify_ctx.c index e2a4ee477b..3c8340137f 100644 --- a/crypto/ts/ts_verify_ctx.c +++ b/crypto/ts/ts_verify_ctx.c @@ -60,7 +60,7 @@ X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s) return ctx->store; } -STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx, +STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs) { ctx->certs = certs; diff --git a/include/openssl/ts.h b/include/openssl/ts.h index 231d6052f9..6bd1f89152 100644 --- a/include/openssl/ts.h +++ b/include/openssl/ts.h @@ -421,7 +421,10 @@ BIO *TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *b); unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, unsigned char *hexstr, long len); X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s); -STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); +# if !OPENSSL_API_3 +# define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert) +# endif +STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); /*- * If ctx is NULL, it allocates and returns a new object, otherwise diff --git a/util/libcrypto.num b/util/libcrypto.num index 5db70cfef8..d818197965 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -916,7 +916,7 @@ TS_TST_INFO_ext_free 938 3_0_0 EXIST::FUNCTION:TS i2d_X509_CRL_fp 939 3_0_0 EXIST::FUNCTION:STDIO PKCS7_get0_signers 940 3_0_0 EXIST::FUNCTION: X509_STORE_CTX_set_ex_data 941 3_0_0 EXIST::FUNCTION: -TS_VERIFY_CTS_set_certs 942 3_0_0 EXIST::FUNCTION:TS +TS_VERIFY_CTX_set_certs 942 3_0_0 EXIST::FUNCTION:TS BN_MONT_CTX_copy 943 3_0_0 EXIST::FUNCTION: OPENSSL_INIT_new 945 3_0_0 EXIST::FUNCTION: TS_ACCURACY_dup 946 3_0_0 EXIST::FUNCTION:TS diff --git a/util/missingcrypto.txt b/util/missingcrypto.txt index 08dc6be186..408e6ffc63 100644 --- a/util/missingcrypto.txt +++ b/util/missingcrypto.txt @@ -1080,7 +1080,7 @@ TS_TST_INFO_set_serial TS_TST_INFO_set_time TS_TST_INFO_set_tsa TS_TST_INFO_set_version -TS_VERIFY_CTS_set_certs +TS_VERIFY_CTX_set_certs TS_VERIFY_CTX_add_flags TS_VERIFY_CTX_cleanup TS_VERIFY_CTX_free diff --git a/util/missingmacro.txt b/util/missingmacro.txt index db4ce86eb3..4b7cdd77df 100644 --- a/util/missingmacro.txt +++ b/util/missingmacro.txt @@ -214,3 +214,4 @@ X509V3_set_ctx_test X509V3_set_ctx_nodb EXT_BITSTRING EXT_IA5STRING +TS_VERIFY_CTS_set_certs -- cgit v1.2.3