CMS_get0_SignerInfos(3) OpenSSL CMS_get0_SignerInfos(3) NNAAMMEE CMS_get0_SignerInfos, CMS_SignerInfo_get0_signer_id, CMS_SignerInfo_cert_cmp, CMS_set1_signer_certs - CMS signedData signer functions. SSYYNNOOPPSSIISS #include STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno); int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert); void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); DDEESSCCRRIIPPTTIIOONN The function _C_M_S___g_e_t_0___S_i_g_n_e_r_I_n_f_o_s_(_) returns all the CMS_SignerInfo structures associated with a CMS signedData structure. _C_M_S___S_i_g_n_e_r_I_n_f_o___g_e_t_0___s_i_g_n_e_r___i_d_(_) retrieves the certificate signer iden- tifier associated with a specific CMS_SignerInfo structure ssii. Either the keyidentifier will be set in kkeeyyiidd or bbootthh issuer name and serial number in iissssuueerr and ssnnoo. _C_M_S___S_i_g_n_e_r_I_n_f_o___c_e_r_t___c_m_p_(_) compares the certificate cceerrtt against the signer identifier ssii. It returns zero if the comparison is successful and non zero if not. _C_M_S___S_i_g_n_e_r_I_n_f_o___s_e_t_1___s_i_g_n_e_r___c_e_r_t_(_) sets the signers certificate of ssii to ssiiggnneerr. NNOOTTEESS The main purpose of these functions is to enable an application to lookup signers certificates using any appropriate technique when the simpler method of _C_M_S___v_e_r_i_f_y_(_) is not appropriate. In typical usage and application will retrieve all CMS_SignerInfo structures using _C_M_S___g_e_t_0___S_i_g_n_e_r_I_n_f_o_(_) and retrieve the identifier information using CMS. It will then obtain the signer certificate by some unspecified means (or return and error if it cannot be found) and set it using _C_M_S___S_i_g_n_e_r_I_n_f_o___s_e_t_1___s_i_g_n_e_r___c_e_r_t_(_). Once all signer certificates have been set _C_M_S___v_e_r_i_f_y_(_) can be used. Although _C_M_S___g_e_t_0___S_i_g_n_e_r_I_n_f_o_s_(_) can return NULL is an error occur oorr if there are no signers this is not a problem in practice because the only error which can occur is if the ccmmss structure is not of type signedData due to application error. RREETTUURRNN VVAALLUUEESS _C_M_S___g_e_t_0___S_i_g_n_e_r_I_n_f_o_s_(_) returns all CMS_SignerInfo structures, or NULL there are no signers or an error occurs. _C_M_S___S_i_g_n_e_r_I_n_f_o___g_e_t_0___s_i_g_n_e_r___i_d_(_) returns 1 for success and 0 for fail- ure. _C_M_S___S_i_g_n_e_r_I_n_f_o___c_e_r_t___c_m_p_(_) returns 0 for a successful comparison and non zero otherwise. _C_M_S___S_i_g_n_e_r_I_n_f_o___s_e_t_1___s_i_g_n_e_r___c_e_r_t_(_) does not return a value. Any error can be obtained from _E_R_R___g_e_t___e_r_r_o_r(3) SSEEEE AALLSSOO _E_R_R___g_e_t___e_r_r_o_r(3), _C_M_S___v_e_r_i_f_y(3) HHIISSTTOORRYY These functions were first was added to OpenSSL 0.9.8 1.0.1u 2016-09-22 CMS_get0_SignerInfos(3)