CMS_GET0_SIGNERINFOS(3)
π CMS_GET0_SIGNERINFOS(3) π
okay bestie, this is the Library Functions Manual page for CMS_GET0_SIGNERINFOS(3) β aka the CMS SignedData signer functions. it's giving βI need to find and set signer certs myselfβ energy, and honestly? slay. π
β¨ NAME β¨
This page covers CMS_get0_SignerInfos, CMS_SignerInfo_get_version, CMS_SignerInfo_get0_signer_id, CMS_SignerInfo_get0_signature, CMS_SignerInfo_cert_cmp, and CMS_SignerInfo_set1_signer_cert β the CMS SignedData signer functions. π«Ά
πΈ SYNOPSIS πΈ
#include <openssl/cms.h>
STACK_OF(CMS_SignerInfo) *
CMS_get0_SignerInfos(CMS_ContentInfo *cms);
int
CMS_SignerInfo_get_version(CMS_SignerInfo *si, long *version);
int
CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno);
ASN1_OCTET_STRING *
CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
int
CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *certificate);
void
CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
π¦ DESCRIPTION π¦
okay so here's the tea, bestie:
CMS_get0_SignerInfos()returns all the SignerInfo structures associated with the SignedData structurecms. πCMS_SignerInfo_get_version()sets*versionto the syntax version number of the SignerInfo structuresi. βCMS_SignerInfo_get0_signer_id()retrieves the certificate SignerIdentifier associated with the SignerInfo structuresi. Either the SubjectKeyIdentifier will be set inkeyid, or both the issuer name and serial number inissuerandsno. πCMS_SignerInfo_get0_signature()retrieves the signature field ofsi. The application program is allowed to modify the data pointed to. πCMS_SignerInfo_cert_cmp()compares the certificate against the signer identifier ofsi. πCMS_SignerInfo_set1_signer_cert()sets the signer certificate ofsitosigner. π
The main character purpose of these functions? To enable an application to look up signer certificates using any appropriate technique when the simpler method of CMS_verify(3) is not appropriate. iykyk. π
In typical usage, an application retrieves all CMS_SignerInfo structures using CMS_get0_SignerInfos() and retrieves the identifier information using CMS. It will then obtain the signer certificate by some unspecified means (or return an error if it cannot be found) and set it using CMS_SignerInfo_set1_signer_cert(). Once all signer certificates have been set, CMS_verify(3) can be used. β¨
π RETURN VALUES π
okay, what do you get back:
CMS_get0_SignerInfos()returns an internal pointer to all theCMS_SignerInfostructures, orNULLif there are no signers or ifcmsis not of the typeSignedData. πCMS_SignerInfo_get_version()always succeeds and returns1. periodt. πCMS_SignerInfo_get0_signer_id()returns1for success or0for failure. π«ΆCMS_SignerInfo_get0_signature()returns an internal pointer to the signature. π₯CMS_SignerInfo_cert_cmp()returns0for a match or non-zero otherwise. π- Any error can be obtained from
ERR_get_error(3). π§
π SEE ALSO π
π STANDARDS π
RFC 5652: Cryptographic Message Syntax (CMS)- section 5.1: SignedData Type
- section 5.3: SignerInfo Type
π HISTORY π
CMS_get0_SignerInfos(), CMS_SignerInfo_get0_signer_id(), CMS_SignerInfo_cert_cmp(), and CMS_SignerInfo_set1_signer_cert() first appeared in OpenSSL 0.9.8h, and CMS_SignerInfo_get0_signature() in OpenSSL 1.0.2. These functions have been available since OpenBSD 6.7. β³
CMS_SignerInfo_get_version() first appeared in OpenBSD 7.4. π¦
mwah π β this page is from the Debian build dated January 22, 2024, for CMS_GET0_SIGNERINFOS(3). stay iconic, bestie πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2008, 2013 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms