Source Code/My Patch

[CMPOSSL] CMP CTX ์—์„œ serverName, serverPath, serverPort ์ •๋ณด ์–ป๊ธฐ ํ•จ์ˆ˜

JayKim๐Ÿ™‚ 2019. 12. 13. 09:35

cmp.h ์—  ํ•จ์ˆ˜ ์ •์˜ ์ถ”๊ฐ€

const char* OSSL_CMP_CTX_getServerPath(OSSL_CMP_CTX *ctx);
const char* OSSL_CMP_CTX_getServer(OSSL_CMP_CTX *ctx);
int OSSL_CMP_CTX_getServerPort(OSSL_CMP_CTX *ctx);

 

cmp_ctx.c ์— ์ฝ”๋“œ ์ถ”๊ฐ€

const char* OSSL_CMP_CTX_getServerPath(OSSL_CMP_CTX *ctx)
{
	if( ctx == NULL ) return NULL;

	return ctx->serverPath;
}

int OSSL_CMP_CTX_getServerPort(OSSL_CMP_CTX *ctx)
{
	if( ctx == NULL ) return -1;

	return ctx->serverPort;
}

const char* OSSL_CMP_CTX_getServer(OSSL_CMP_CTX *ctx)
{
	if( ctx == NULL ) return NULL;
	return ctx->server;
}

์ฐธ๊ณ )OpenSSL3 ์—์„œ๋Š” serverName -> server ๋กœ ๋ชจ๋‘ ๋ณ€๊ฒฝ ๋จ.