Hi, Thanks Pauli, the API worked but also I have a callback defined as below which is failing at corrupt phase: int SelfTestCb(const OSSL_PARAM params[], void *arg) { int ret = 0; const OSSL_PARAM *p = NULL; const char *phase = NULL; const char *type = NULL; const char *desc = NULL; //BIO *bio_out = BIO_new_file("FipsSelfTestFile.txt", "w"); p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_PHASE); if ((p == NULL) || (arg) || (p -> data_type != OSSL_PARAM_UTF8_STRING)) goto err; phase = (const char *)p -> data; p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_DESC); if ((p == NULL) || (p -> data_type != OSSL_PARAM_UTF8_STRING)) goto err; desc = (const char *)p -> data; p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_TYPE); if ((p == NULL) || (p -> data_type != OSSL_PARAM_UTF8_STRING)) goto err; type = (const char *)p ->data; /* Do some logging */ if (strcmp(phase, OSSL_SELF_TEST_PHASE_START) == 0) syslog(LOG_NOTICE, "%s : (%s) : ", desc, type); if ((strcmp(phase, OSSL_SELF_TEST_PHASE_PASS) == 0) || (strcmp(phase, OSSL_SELF_TEST_PHASE_FAIL) ==0)) syslog(LOG_NOTICE, "%s\n", phase); /* Corrupt the SHA1 self-test during the 'corrupt' phase by returning 0 */ if (strcmp(phase, OSSL_SELF_TEST_PHASE_CORRUPT) == 0){ //
ß--------------THIS FAILS syslog(LOG_NOTICE, "%s %s", phase, desc); return 0; } ret = 1; err: return ret; } Thanks, Ashish From: openssl-users <openssl-users-bounces@xxxxxxxxxxx>
On Behalf Of Dr Paul Dale Have you considered using the provided for this: OSSL_PROVIDER_self_test()? On 8/2/22 17:41, Gahlot, Ashish Kumar wrote:
Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. and its Affiliates that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments. |