From: FdaSilvaYY Date: Fri, 10 Mar 2023 14:21:05 +0000 (+0100) Subject: nit: tidy-up code, and fix a typo. X-Git-Tag: openssl-3.2.0-alpha1~1123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f42d6b7ae62a2b2914b144153af56096f9b4a6d5;p=thirdparty%2Fopenssl.git nit: tidy-up code, and fix a typo. Reviewed-by: David von Oheimb Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/20436) --- diff --git a/crypto/cmp/cmp_ctx.c b/crypto/cmp/cmp_ctx.c index fe26f92bcc7..7dd832481a1 100644 --- a/crypto/cmp/cmp_ctx.c +++ b/crypto/cmp/cmp_ctx.c @@ -424,8 +424,8 @@ int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx, } /* Set or clear the password to be used for protecting messages with PBMAC */ -int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, const unsigned char *sec, - int len) +int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, + const unsigned char *sec, int len) { ASN1_OCTET_STRING *secretValue = NULL; diff --git a/doc/man3/OSSL_CMP_CTX_new.pod b/doc/man3/OSSL_CMP_CTX_new.pod index 69bd64b6763..040be8e167c 100644 --- a/doc/man3/OSSL_CMP_CTX_new.pod +++ b/doc/man3/OSSL_CMP_CTX_new.pod @@ -119,8 +119,8 @@ OSSL_CMP_CTX_set1_senderNonce int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey); int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx, const unsigned char *ref, int len); - int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, const unsigned char *sec, - const int len); + int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, + const unsigned char *sec, const int len); /* CMP message header and extra certificates: */ int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name); @@ -485,7 +485,7 @@ OSSL_CMP_CTX_build_cert_chain() builds a certificate chain for the CMP signer certificate previously set in the I. It adds the optional I, a list of intermediate CA certs that may already constitute the targeted chain, to the untrusted certs that may already exist in the I. -Then the function uses this augumented set of certs for chain construction. +Then the function uses this augmented set of certs for chain construction. If I is NULL it builds the chain as far down as possible and ignores any verification errors. Else the CMP signer certificate must be verifiable where the chain reaches a trust anchor contained in I. diff --git a/include/openssl/cmp.h.in b/include/openssl/cmp.h.in index ea45c60548e..0ac7f5b0406 100644 --- a/include/openssl/cmp.h.in +++ b/include/openssl/cmp.h.in @@ -329,8 +329,8 @@ int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted, int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey); int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx, const unsigned char *ref, int len); -int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, const unsigned char *sec, - const int len); +int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx, + const unsigned char *sec, const int len); /* CMP message header and extra certificates: */ int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name); int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);