Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! CMP: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeev-0 committed Oct 16, 2024
1 parent 2c73c9b commit 4dd65dd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions crypto/cmp/cmp_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1156,8 +1156,8 @@ X509 *ossl_cmp_certresponse_get1_cert(const OSSL_CMP_CTX *ctx, const OSSL_CMP_CE
ERR_raise(ERR_LIB_CMP, CMP_R_MISSING_PRIVATE_KEY);
return NULL;
}
crt = OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(coec->value.encryptedCert, pkey, 0,
ctx->libctx, ctx->propq);
crt = OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(coec->value.encryptedCert,
ctx->libctx, ctx->propq, pkey, 0);
break;
default:
ERR_raise(ERR_LIB_CMP, CMP_R_UNKNOWN_CERT_TYPE);
Expand Down
12 changes: 6 additions & 6 deletions crypto/crmf/crmf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encrypt
int len;

p = OSSL_CRMF_ENCRYPTEDVALUE_decrypt(encryptedKey->value.encryptedValue,
pkey, &len, libctx, propq);
libctx, propq, pkey, &len);
if ((p_copy = p) != NULL)
ret = d2i_AutoPrivateKey_ex(NULL, &p_copy, len, libctx, propq);
OPENSSL_free(p);
Expand Down Expand Up @@ -762,8 +762,8 @@ EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encrypt

unsigned char
*OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
EVP_PKEY *pkey, int *outlen,
OSSL_LIB_CTX *libctx, const char *propq)
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, int *outlen)
{
EVP_CIPHER_CTX *evp_ctx = NULL; /* context for symmetric encryption */
unsigned char *ek = NULL; /* decrypted symmetric encryption key */
Expand Down Expand Up @@ -875,7 +875,7 @@ X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecer
int len;
X509 *cert = NULL;

buf = OSSL_CRMF_ENCRYPTEDVALUE_decrypt(ecert, pkey, &len, libctx, propq);
buf = OSSL_CRMF_ENCRYPTEDVALUE_decrypt(ecert, libctx, propq, pkey, &len);
if ((p = buf) == NULL || (cert = X509_new_ex(libctx, propq)) == NULL)
goto end;

Expand All @@ -897,8 +897,8 @@ X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecer
* returns NULL on error or if no certificate available
*/
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
EVP_PKEY *pkey, unsigned int flags,
OSSL_LIB_CTX *libctx, const char *propq)
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, unsigned int flags)
{
#ifndef OPENSSL_NO_CMS
BIO *bio;
Expand Down
10 changes: 5 additions & 5 deletions doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ OSSL_CRMF_MSG_centralKeygen_requested
const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);

X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
EVP_PKEY *pkey, unsigned int flags
OSSL_LIB_CTX *libctx, const char *propq);
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, unsigned int flags);
EVP_PKEY
*OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
X509_STORE *ts, STACK_OF(X509) *extra,
Expand All @@ -53,11 +53,11 @@ OSSL_CRMF_MSG_centralKeygen_requested

unsigned char
*OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
EVP_PKEY *pkey, int *outlen,
OSSL_LIB_CTX *libctx, const char *propq);
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, int *outlen);
X509
*OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
OSSL_LIB_CTX *libctx, const char *propq
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey);

int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
Expand Down
8 changes: 4 additions & 4 deletions include/openssl/crmf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecer
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey);
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
EVP_PKEY *pkey, unsigned int flags,
OSSL_LIB_CTX *libctx, const char *propq);
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, unsigned int flags);
unsigned char
*OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
EVP_PKEY *pkey, int *outlen,
OSSL_LIB_CTX *libctx, const char *propq);
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey, int *outlen);
EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
X509 *cert, ASN1_OCTET_STRING *secret,
Expand Down

0 comments on commit 4dd65dd

Please sign in to comment.