diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-08 13:30:44 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-13 19:42:00 +0200 |
commit | 63f1883dca7a42949e8b9db5b035c17fc160f998 (patch) | |
tree | 749712829ed5f1086740c7e7b72c8d881ccb0ba1 /apps | |
parent | 143be4748e49ff0181964affcbf422a895c48e85 (diff) |
Rename OSSL_CMP_CTX_set1_clCert() to OSSL_CMP_CTX_set1_cert()
Also update documentation and example code in openssl-cmp.pod.in
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11470)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/cmp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/cmp.c b/apps/cmp.c index cf36d67fef..9e40534995 100644 --- a/apps/cmp.c +++ b/apps/cmp.c @@ -1535,7 +1535,8 @@ static OSSL_CMP_SRV_CTX *setup_srv_ctx(ENGINE *e) if (opt_srv_cert != NULL) { X509 *srv_cert = load_cert_pwd(opt_srv_cert, opt_srv_keypass, "certificate of the server"); - if (srv_cert == NULL || !OSSL_CMP_CTX_set1_clCert(ctx, srv_cert)) { + + if (srv_cert == NULL || !OSSL_CMP_CTX_set1_cert(ctx, srv_cert)) { X509_free(srv_cert); goto err; } @@ -1939,7 +1940,7 @@ static int setup_protection_ctx(OSSL_CMP_CTX *ctx, ENGINE *e) } if (opt_cert != NULL) { - X509 *clcert; + X509 *cert; STACK_OF(X509) *certs = NULL; int ok; @@ -1948,14 +1949,14 @@ static int setup_protection_ctx(OSSL_CMP_CTX *ctx, ENGINE *e) /* opt_keypass is needed if opt_cert is an encrypted PKCS#12 file */ goto err; - clcert = sk_X509_delete(certs, 0); - if (clcert == NULL) { + cert = sk_X509_delete(certs, 0); + if (cert == NULL) { CMP_err("no client certificate found"); sk_X509_pop_free(certs, X509_free); goto err; } - ok = OSSL_CMP_CTX_set1_clCert(ctx, clcert); - X509_free(clcert); + ok = OSSL_CMP_CTX_set1_cert(ctx, cert); + X509_free(cert); if (ok) { /* add any remaining certs to the list of untrusted certs */ |