OSSL_CRMF_MS...INFO_CERTREQ(3ossl)

πŸ’– OSSL_CRMF_MSG_get0_regInfo_utf8Pairs, OSSL_CRMF_MSG_set1_regInfo_utf8Pairs, OSSL_CRMF_MSG_get0_regInfo_certReq, OSSL_CRMF_MSG_set1_regInfo_certReq β€” the CRMF Registration Info getters & setters πŸ’–

okay so bestie, welcome to the 3ossl manual section 🌸 this one is all about CRMF Registration Info β€” the little side-quest data you can bolt onto a certificate request message. it's giving "getting or setting CRMF Registration Info" and honestly? iconic. πŸŽ€


✨ NAME ✨

OSSL_CRMF_MSG_get0_regInfo_utf8Pairs, OSSL_CRMF_MSG_set1_regInfo_utf8Pairs, OSSL_CRMF_MSG_get0_regInfo_certReq, OSSL_CRMF_MSG_set1_regInfo_certReq β€” functions getting or setting CRMF Registration Info πŸ’…


🌈 SYNOPSIS 🌈

first things first, you gotta pull in the header, no cap:

#include <openssl/crmf.h>

ASN1_UTF8STRING
    *OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg,
                                         const ASN1_UTF8STRING *utf8pairs);
OSSL_CRMF_CERTREQUEST
    *OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg);
int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
                                       const OSSL_CRMF_CERTREQUEST *cr);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, four functions, two flavors: getters and setters. the getters are the "gimme what's in there" girls, the setters are the "here, take a copy" girls. 🫢

  • OSSL_CRMF_MSG_get0_regInfo_utf8Pairs() β€” returns the first utf8Pairs regInfo in the given msg, if present. if it's not there? you get nothing, bestie, and that's fine. πŸ’€
  • OSSL_CRMF_MSG_set1_regInfo_utf8Pairs() β€” adds a copy of the given utf8pairs value as utf8Pairs regInfo to the given msg. see RFC 4211 section 7.1 πŸ“– (yes we cite our sources, we're not messy)
  • OSSL_CRMF_MSG_get0_regInfo_certReq() β€” returns the first certReq regInfo in the given msg, if present. same energy as the first getter fr fr.
  • OSSL_CRMF_MSG_set1_regInfo_certReq() β€” adds a copy of the given cr value as certReq regInfo to the given msg. see RFC 4211 section 7.2 πŸ“–
lowkey note: both setters copy the value in. you keep your original, they keep theirs. nobody's sharing pointers here, we're respectful. πŸ’œ

⭐ RETURN VALUES ⭐

  • all the get0_*() functions return the respective pointer value, and NULL if it's not present. simple as that. πŸ™ˆ
  • all the set1_*() functions return 1 on success, 0 on error. slay or flop, binary, no in-between. πŸ’…

πŸ”₯ NOTES πŸ”₯

okay this part is important so listen up bestie πŸ‘‘

calling the set1_*() functions multiple times adds multiple instances of the respective control to the regInfo structure of the given msg. so you can stack 'em, technically.

BUT β€” and this is the plot twist 😭 β€” while RFC 4211 expects multiple utf8Pairs in one regInfo structure, it does NOT allow multiple certReq. so like, multiple utf8Pairs? sure, go off. multiple certReq? absolutely not, that's not the vibe, RFC said no. 🚫


πŸ‘‘ SEE ALSO πŸ‘‘

  • RFC 4211 β€” the source material, the blueprint, the main character πŸ“œ

🧚 HISTORY 🧚

the OpenSSL CRMF support was added in OpenSSL 3.0. so if you're on something older, sorry babe, it's not there. ✨


Copyright 2007-2021 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 that's the whole page, you ate it, you understood it, periodt πŸŽ€ and just so you have the receipts: this was OpenSSL 3.5.9, dated 2026-09-29 πŸ’– bye bestie, go set some regInfo responsibly πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from