Skip to content

Commit

Permalink
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 08d221a commit 2c73c9b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions crypto/crmf/crmf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,9 @@ unsigned char
* returns a pointer to the decrypted certificate
* returns NULL on error or if no certificate available
*/
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert, EVP_PKEY *pkey,
OSSL_LIB_CTX *libctx, const char *propq)
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
OSSL_LIB_CTX *libctx, const char *propq,
EVP_PKEY *pkey)
{
unsigned char *buf = NULL;
const unsigned char *p;
Expand Down Expand Up @@ -905,8 +906,8 @@ X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
#endif

if (ecert->type != OSSL_CRMF_ENCRYPTEDKEY_ENVELOPEDDATA)
return OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(ecert->value.encryptedValue, pkey,
libctx, propq);
return OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(ecert->value.encryptedValue,
libctx, propq, pkey);
#ifndef OPENSSL_NO_CMS
bio = CMS_EnvelopedData_decrypt(ecert->value.envelopedData, NULL,
pkey, NULL /* cert */, NULL, flags,
Expand Down
5 changes: 3 additions & 2 deletions doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ OSSL_CRMF_MSG_centralKeygen_requested
EVP_PKEY *pkey, int *outlen,
OSSL_LIB_CTX *libctx, const char *propq);
X509
*OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert, EVP_PKEY *pkey
OSSL_LIB_CTX *libctx, const char *propq);
*OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
OSSL_LIB_CTX *libctx, const char *propq
EVP_PKEY *pkey);

int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
int OSSL_CRMF_MSG_centralKeygen_requested(const OSSL_CRMF_MSG *crm,
Expand Down
5 changes: 3 additions & 2 deletions include/openssl/crmf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
const X509_NAME *subject,
const X509_NAME *issuer,
const ASN1_INTEGER *serial);
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert, EVP_PKEY *pkey,
OSSL_LIB_CTX *libctx, const char *propq);
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
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);
Expand Down
2 changes: 1 addition & 1 deletion test/recipes/80-test_cmp_http_data/test_commands.csv
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ expected,description, -section,val, -cmd,val,val2, -cacertsout,val,val2, -infoty
1, using popo -1 alternatively to -centralkeygen, -section,, -cmd,cr,, -popo,-1, -newkeyout,_RESULT_DIR/newkeyout3.pem, -newkeypass,pass:12345, -certout,_RESULT_DIR/test.cert3.pem
1, using centrally generated key (and cert) , -section,, -cmd,cr,,-cert,_RESULT_DIR/test.cert3.pem, -key,_RESULT_DIR/newkeyout3.pem, -keypass,pass:12345
0, using centrally generated key with wrong password, -section,, -cmd,cr,,-cert,_RESULT_DIR/test.cert3.pem, -key,_RESULT_DIR/newkeyout3.pem, -keypass,pass:wrong
0, using popo -1 (instead of -centralkeygen) without -newkeyout, -section,, -cmd,cr,, -popo,-1,,BLANK,,BLANK,,BLANK,,BLANK,
0, using popo -1 (instead of -centralkeygen) without -newkeyout, -section,, -cmd,cr,, -popo,-1,,BLANK,,BLANK,,BLANK,,BLANK

0 comments on commit 2c73c9b

Please sign in to comment.