OSSL_CRMF_MS...CTRL_REGTOKEN(3SSL)
π OSSL_CRMF_MS...CTRL_REGTOKEN(3SSL) β the OpenSSL page about CRMF Registration Controls β¨
okay bestie, sit down, hydrate, because this is the OSSL_CRMF_MS...CTRL_REGTOKEN(3SSL) manual page and it's literally all about getting and setting CRMF Registration Controls. it's giving certificate-request-glow-up energy and honestly? we're obsessed. π
πΈ NAME πΈ
OSSL_CRMF_MSG_get0_regCtrl_regToken, OSSL_CRMF_MSG_set1_regCtrl_regToken, OSSL_CRMF_MSG_get0_regCtrl_authenticator, OSSL_CRMF_MSG_set1_regCtrl_authenticator, OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo, OSSL_CRMF_MSG_set0_SinglePubInfo, OSSL_CRMF_MSG_set_PKIPublicationInfo_action, OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo, OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo, OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey, OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey, OSSL_CRMF_MSG_get0_regCtrl_oldCertID, OSSL_CRMF_MSG_set1_regCtrl_oldCertID, OSSL_CRMF_CERTID_gen
β¦are all functions getting or setting CRMF Registration Controls. that's the whole assignment. no notes. π
β¨ SYNOPSIS β¨
like, here's the whole cast, verbatim, no editing, we do NOT touch the code bestie:
#include <openssl/crmf.h>
ASN1_UTF8STRING
*OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
const ASN1_UTF8STRING *tok);
ASN1_UTF8STRING
*OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
const ASN1_UTF8STRING *auth);
int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(
OSSL_CRMF_PKIPUBLICATIONINFO *pi,
OSSL_CRMF_SINGLEPUBINFO *spi);
int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
int method, GENERAL_NAME *nm);
int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(
OSSL_CRMF_PKIPUBLICATIONINFO *pi, int action);
OSSL_CRMF_PKIPUBLICATIONINFO
*OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
X509_PUBKEY
*OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
const X509_PUBKEY *pubkey);
OSSL_CRMF_CERTID
*OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
const OSSL_CRMF_CERTID *cid);
OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
const ASN1_INTEGER *serial);
π¦ DESCRIPTION π¦
okay so, breakdown time. π«Ά
Every single one of the OSSL_CRMF_MSG_get0_regCtrl_X() functions is out here doing the same cute little trick: it returns the respective control X in the given msg, if present. if it's not there, well, that's a them problem (and technically a you problem, see RETURN VALUES below, no spoilers π).
OSSL_CRMF_MSG_set1_regCtrl_regToken()β sets the regToken control in the givenmsg, copying the giventokas the value. see RFC 4211, section 6.1. iconic. βOSSL_CRMF_MSG_set1_regCtrl_authenticator()β sets the authenticator control in the givenmsg, copying the givenauthas the value. see RFC 4211, section 6.2. she's verified, she's secure, she's slaying. πOSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo()β pushes the givenspitosi. and heads up bestie: it consumes thespipointer. so like, that pointer is hers now. don't touch it after. πOSSL_CRMF_MSG_set0_SinglePubInfo()β sets, in the given SinglePubInfospi, themethodand the publication location, which shows up in the form of a GeneralName,nm. the publication location is optional, sonmmay beNULL. the function consumes thenmpointer if present. available methods are:
# define OSSL_CRMF_PUB_METHOD_DONTCARE 0
# define OSSL_CRMF_PUB_METHOD_X500 1
# define OSSL_CRMF_PUB_METHOD_WEB 2
# define OSSL_CRMF_PUB_METHOD_LDAP 3
OSSL_CRMF_MSG_set_PKIPublicationInfo_action()β sets theactionin the givenpi, using the givenactionas the value. see RFC 4211, section 6.3. available actions are:
# define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
# define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo()β sets the pkiPublicationInfo control in the givenmsg, copying the giventokas the value. see RFC 4211, section 6.3. πOSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey()β sets the protocolEncrKey control in the givenmsg, copying the givenpubkeyas the value. see RFC 4211 section 6.6. (yes, no comma before the section number here, we keep it exactly as the original said it, no cap π₯)OSSL_CRMF_MSG_set1_regCtrl_oldCertID()β sets the oldCertID regToken control in the givenmsg, copying the givencidas the value. see RFC 4211, section 6.5. it's the "my old cert, but make it reference" moment. πOSSL_CRMF_CERTID_genβ produces anOSSL_CRMF_CERTID_genstructure, copying the givenissuername andserialnumber. boom. generated. β¨
π RETURN VALUES π
- All
OSSL_CRMF_MSG_get0_*()functions return the respective pointer value, orNULLif not present and on error. (yes, both. not present AND error both hand you aNULL. rude but consistent. π) - All
OSSL_CRMF_MSG_set1_*()functions return 1 on success, 0 on error. OSSL_CRMF_CERTID_gen()returns a pointer to the resulting structure, orNULLon error.
π§ NOTES π§
so, tea time: a function OSSL_CRMF_MSG_set1_regCtrl_pkiArchiveOptions() for setting an Archive Options Control is not yet implemented, because the features needed to create the needed OSSL_CRMF_PKIARCHIVEOPTINS content are missing. she's not here yet bestie, we wait. β³
π SEE ALSO π
π HISTORY π
The OpenSSL CRMF support was added in OpenSSL 3.0. a glow-up for the ages. π
π COPYRIGHT π
Copyright 2007-2022 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>.
okay and that's the whole page, bestie!! mwah π this was OpenSSL 4.0.3, dated 2026-09-29 β go forth, set your registration controls, and remember: don't use the consumed pointers after they're consumed. periodt. ππ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms