addressed review comments part1

This commit is contained in:
Hideki Miyazaki
2021-04-14 11:58:41 +09:00
parent bca3cd1d49
commit b37f1ac0c0

View File

@ -55466,9 +55466,9 @@ void wolfSSL_CONF_CTX_free(WOLFSSL_CONF_CTX* cctx)
} }
} }
/** /**
* Release WOLFSSL_CONF_CTX instance * Set WOLFSSL_CTX instance to WOLFSSL_CONF_CTX
* @param cctx a pointer to WOLFSSL_CONF_CTX structure to set a pointer * @param cctx a pointer to WOLFSSL_CONF_CTX structure to set a WOLFSSL_CTX
* to WOLFSSL_CTX * pointer to its ctx
* @param ctx a pointer to WOLFSSL_CTX structure to be set * @param ctx a pointer to WOLFSSL_CTX structure to be set
* @return none * @return none
*/ */
@ -55476,37 +55476,37 @@ void wolfSSL_CONF_CTX_set_ssl_ctx(WOLFSSL_CONF_CTX* cctx, WOLFSSL_CTX *ctx)
{ {
WOLFSSL_ENTER("wolfSSL_CONF_CTX_set_ssl_ctx"); WOLFSSL_ENTER("wolfSSL_CONF_CTX_set_ssl_ctx");
//sanity check /* sanity check */
if (cctx == NULL) { if (cctx == NULL) {
WOLFSSL_MSG("cctx is null"); WOLFSSL_MSG("cctx is null");
return; return;
} }
if (ctx != NULL) { cctx->ctx = ctx;
cctx->ctx = ctx;
} else {
cctx->ctx = NULL;
}
} }
/** /**
* set flag value into WOLFSSL_CONF_CTX * set flag value into WOLFSSL_CONF_CTX
* @param cctx a pointer to WOLFSSL_CONF_CTX structure to be set * @param cctx a pointer to WOLFSSL_CONF_CTX structure to be set
* @param flags falg value to be OR'sd * @param flags falg value to be OR'd
* @return OR'd flag value, otherwise 0 * @return OR'd flag value, otherwise 0
*/ */
unsigned int wolfSSL_CONF_CTX_set_flags(WOLFSSL_CONF_CTX* cctx, unsigned int flags) unsigned int wolfSSL_CONF_CTX_set_flags(WOLFSSL_CONF_CTX* cctx,
unsigned int flags)
{ {
//sanity check /* sanity check */
if (cctx == NULL) return 0; if (cctx == NULL)
return 0;
cctx->flags |= flags; cctx->flags |= flags;
return cctx->flags; return cctx->flags;
} }
#ifndef NO_WOLFSSL_STUB #ifndef NO_WOLFSSL_STUB
/** /**
* finish configuration command operation * finish configuration command operation
* @param cctx a pointer to WOLFSSL_CONF_CTX structure to be set * @param cctx a pointer to WOLFSSL_CONF_CTX structure to be set
* @return WOLFSSL_FAILURE for now * @return WOLFSSL_SUCCESS on success,
* otherwise WOLFSSL_FAILURE (stub currently returns WOLFSSL_FAILURE always)
*/ */
int wolfSSL_CONF_CTX_finish(WOLFSSL_CONF_CTX* cctx) int wolfSSL_CONF_CTX_finish(WOLFSSL_CONF_CTX* cctx)
{ {
@ -55519,7 +55519,8 @@ int wolfSSL_CONF_CTX_finish(WOLFSSL_CONF_CTX* cctx)
* @param cctx a pointer to WOLFSSL_CONF_CTX structure * @param cctx a pointer to WOLFSSL_CONF_CTX structure
* @param cmd configuration command * @param cmd configuration command
* @param value arguments for cmd * @param value arguments for cmd
* @return WOLFSSL_FAILURE for now * @return WOLFSSL_SUCCESS on success,
* otherwise WOLFSSL_FAILURE (stub currently returns WOLFSSL_FAILURE always)
*/ */
int wolfSSL_CONF_cmd(WOLFSSL_CONF_CTX* cctx, const char* cmd, const char* value) int wolfSSL_CONF_cmd(WOLFSSL_CONF_CTX* cctx, const char* cmd, const char* value)
{ {
@ -55531,14 +55532,15 @@ int wolfSSL_CONF_cmd(WOLFSSL_CONF_CTX* cctx, const char* cmd, const char* value)
} }
/** /**
* returns a new idex or -1 on failure * returns a new index or -1 on failure
* @param class index one of CRYPTO_EX_INDEX_xxx * @param class index one of CRYPTO_EX_INDEX_xxx
* @param argp parameters to be saved * @param argp parameters to be saved
* @param argl parameters to be saved * @param argl parameters to be saved
* @param new_func a pointer to WOLFSSL_CRYPTO_EX_new * @param new_func a pointer to WOLFSSL_CRYPTO_EX_new
* @param dup_func a pointer to WOLFSSL_CRYPTO_EX_dup * @param dup_func a pointer to WOLFSSL_CRYPTO_EX_dup
* @param free_func a pointer to WOLFSSL_CRYPTO_EX_free * @param free_func a pointer to WOLFSSL_CRYPTO_EX_free
* @return WOLFSSL_FAILURE for now * @return WOLFSSL_SUCCESS on success,
* otherwise WOLFSSL_FAILURE (stub currently returns WOLFSSL_FAILURE always)
*/ */
#ifdef HAVE_EX_DATA #ifdef HAVE_EX_DATA
int wolfSSL_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, int wolfSSL_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
@ -55558,11 +55560,11 @@ int wolfSSL_CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
#endif #endif
/** /**
* retrive p, q and g parameter * Return DH p, q and g parameters
* @param dh a pointer to WOLFSSL_DH * @param dh a pointer to WOLFSSL_DH
* @param p a pointer to WOLFSSL_BIGNUM to be obtained dh * @param p a pointer to WOLFSSL_BIGNUM to be obtained from dh
* @param q a pointer to WOLFSSL_BIGNUM to be obtained dh * @param q a pointer to WOLFSSL_BIGNUM to be obtained from dh
* @param q a pointer to WOLFSSL_BIGNUM to be obtained dh * @param q a pointer to WOLFSSL_BIGNUM to be obtained from dh
*/ */
void wolfSSL_DH_get0_pqg(const WOLFSSL_DH *dh, const WOLFSSL_BIGNUM **p, void wolfSSL_DH_get0_pqg(const WOLFSSL_DH *dh, const WOLFSSL_BIGNUM **p,
const WOLFSSL_BIGNUM **q, const WOLFSSL_BIGNUM **g) const WOLFSSL_BIGNUM **q, const WOLFSSL_BIGNUM **g)