OSSL_CRMF_MSG_SET0_VALIDITY(3ossl)
π OSSL_CRMF_MSG_SET0_VALIDITY(3ossl) β like, the whole CRMF populating-and-verifying squad β¨
okay so bestie, welcome to the OpenSSL manual page OSSL_CRMF_MSG_SET0_VALIDITY(3ossl) π this one is all about the little functions that populate and verify CRMF CertReqMsg structures β the glow-up crew for your cert request messages π
πΈ NAME πΈ
OSSL_CRMF_MSG_set0_validity, OSSL_CRMF_MSG_set_certReqId, OSSL_CRMF_CERTTEMPLATE_fill, OSSL_CRMF_MSG_set0_extensions, OSSL_CRMF_MSG_push0_extension, OSSL_CRMF_MSG_create_popo, OSSL_CRMF_MSGS_verify_popo β functions populating and verifying CRMF CertReqMsg structures π
β¨ SYNOPSIS β¨
#include <openssl/crmf.h>
int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
EVP_PKEY *pubkey,
const X509_NAME *subject,
const X509_NAME *issuer,
const ASN1_INTEGER *serial);
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
EVP_PKEY *pkey, const EVP_MD *digest,
OSSL_LIB_CTX *libctx, const char *propq);
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
int rid, int acceptRAVerified,
OSSL_LIB_CTX *libctx, const char *propq);
π¦ DESCRIPTION π¦
π the setters, one by one π
OSSL_CRMF_MSG_set0_validity()β sets thenotBeforeandnotAfterfields as validity constraints in thecertTemplateofcrmβ° ngl either of thenotBeforeandnotAfterparameters can beNULL, and that just means "no constraint for the respective field" β lowkey freeing, honestly. On success, ownership ofnotBeforeandnotAftergets transferred tocrmπ«ΆOSSL_CRMF_MSG_set_certReqId()β setsridas thecertReqIdofcrmπ short and sweet, she ate.OSSL_CRMF_CERTTEMPLATE_fill()β sets those fields of thecertTemplatetmplfor which non-NULLvalues are provided:pubkey,subject,issuer, and/orserialπ X.509 extensions may be set usingOSSL_CRMF_MSG_set0_extensions(). On success the reference counter of thepubkey(if given) is incremented, while thesubject,issuer, andserialstructures (if given) are copied β¨OSSL_CRMF_MSG_set0_extensions()β setsextsas the extensions in thecertTemplateofcrmπ frees any pre-existing ones and consumesextsβ it's giving "out with the old, in with the new".OSSL_CRMF_MSG_push0_extension()β pushes the X509 extensionextto the extensions in thecertTemplateofcrmπ§ consumesext, bestie, so don't come for her afterwards.
π₯ the POPO queen herself π₯
OSSL_CRMF_MSG_create_popo() creates and sets the Proof-of-Possession (POPO) according to the method meth in crm π the library context libctx and property query string propq may be NULL to select the defaults. In case the method is OSSL_CRMF_POPO_SIGNATURE the POPO is calculated using the private key pkey and the digest method digest β where the digest argument is ignored if pkey is of a type (such as Ed25519 and Ed448) that is implicitly associated with a digest algorithm π yeah she already knows her digest, don't @ her.
meth can be one of the following:
OSSL_CRMF_POPO_NONEβ RFC 4211, section 4, POP field omitted π«₯ CA/RA uses out-of-band method to verify POP. Note that servers may fail in this case, resulting for instance in HTTP error code500(Internal error) π so like, be aware.OSSL_CRMF_POPO_RAVERIFIEDβ RFC 4211, section 4, explicit indication that the RA has already verified the POP βOSSL_CRMF_POPO_SIGNATUREβ RFC 4211, section 4.1, only case 3 supported so far ποΈOSSL_CRMF_POPO_KEYENCβ RFC 4211, section 4.2, only indirect method (subsequentMessage/enccert) supported, challenge-response exchange (challengeResp) not yet supported πOSSL_CRMF_POPO_KEYAGREEβ RFC 4211, section 4.3, not yet supported π§ she's not ready yet, okay?
π and the verifier π
OSSL_CRMF_MSGS_verify_popo verifies the Proof-of-Possession of the request with the given rid in the list of reqs π optionally accepts RAVerified. It can make use of the library context libctx and property query string propq π
π RETURN VALUES π
All functions return 1 on success, 0 on error βοΈ no cap, that's the whole vibe check.
π SEE ALSO π
RFC 4211 β go read it, iykyk π
β HISTORY β
The OpenSSL CRMF support was added in OpenSSL 3.0 π
π COPYRIGHT π
Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
bestie this page is from OpenSSL3.5.6, dated2026-04-07, and it'sOSSL_CRMF_MSG_SET0_VALIDITY(3ossl)β now go forth and populate thoseCertReqMsgstructures, you absolute main character π πβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms