cmp.h.in ์ ํค๋ ์ถ๊ฐ
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses2(OSSL_CMP_CTX *ctx, ASN1_UTF8STRING **ppFreeText );
const ASN1_UTF8STRING* OSSL_CMP_get0_freeText( OSSL_CMP_PKIHEADER *hdr );
int OSSL_CMP_set0_freeText( OSSL_CMP_CTX *ctx, ASN1_UTF8STRING *text );
cmp_ctx.c ์์ค ์ ์ถ๊ฐ
const ASN1_UTF8STRING* OSSL_CMP_get0_freeText( OSSL_CMP_PKIHEADER *hdr )
{
if( hdr == NULL ) return NULL;
return hdr->freeText;
}
int OSSL_CMP_set0_freeText( OSSL_CMP_CTX *ctx, ASN1_UTF8STRING *text )
{
if( ctx == NULL ) return 0;
if( ctx->freeText )
{
ASN1_UTF8STRING_free( ctx->freeText );
ctx->freeText = NULL;
}
ctx->freeText = text;
return 1;
}
cmp_client.c ์์ค์ ์ถ๊ฐ
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses2(OSSL_CMP_CTX *ctx, ASN1_UTF8STRING **ppFreeText )
{
OSSL_CMP_MSG *genm;
OSSL_CMP_MSG *genp = NULL;
STACK_OF(OSSL_CMP_ITAV) *rcvd_itavs = NULL;
if (ctx == NULL) {
ERR_raise(ERR_LIB_CMP, CMP_R_INVALID_ARGS);
return 0;
}
ctx->status = -1;
if ((genm = ossl_cmp_genm_new(ctx)) == NULL)
goto err;
if (!send_receive_check(ctx, genm, &genp, OSSL_CMP_PKIBODY_GENP))
goto err;
/* received stack of itavs not to be freed with the genp */
rcvd_itavs = genp->body->value.genp;
genp->body->value.genp = NULL;
if( genp->header )
{
ASN1_UTF8STRING *pVal = sk_ASN1_UTF8STRING_value( genp->header->freeText, 0);
if( pVal ) *ppFreeText = ASN1_STRING_dup( pVal );
}
err:
OSSL_CMP_MSG_free(genm);
OSSL_CMP_MSG_free(genp);
return rcvd_itavs; /* recv_itavs == NULL indicates an error */
}
์๋์ฐ ์ง์์ ์ํด์๋
utils/libcrypto.num ์ ํจ์๋ช ์ ์ถ๊ฐ ํด ์ฃผ์ด์ผ ํ๋ค.
'Source Code > My Patch' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
PKCS#11 Header ํ์ผ ์ ์ฉ ํ๊ธฐ (0) | 2023.07.07 |
---|---|
[OpenSSL3] OpenSSL ์ปดํ์ผ์ ์ฃผ์ ์ฌํญ (0) | 2023.02.24 |
[Openssl3] OSSL_CMP_certConf_new ์ถ๊ฐ (0) | 2022.03.02 |
[OpenSSL] OSSL_CMP_CERTSTATUS ์ ๋ณด ์ป๊ธฐ ํจ์ (0) | 2019.12.17 |
[CMPOSSL] CMP CTX ์์ serverName, serverPath, serverPort ์ ๋ณด ์ป๊ธฐ ํจ์ (0) | 2019.12.13 |