Lines Matching defs:alg
53 /* Initialise test for "alg" */
54 int (*init) (EVP_TEST * t, const char *alg);
340 static int digest_test_init(EVP_TEST *t, const char *alg)
346 if (is_digest_disabled(alg)) {
347 TEST_info("skipping, '%s' is disabled", alg);
352 if ((digest = fetched_digest = EVP_MD_fetch(libctx, alg, NULL)) == NULL
353 && (digest = EVP_get_digestbyname(alg)) == NULL)
362 TEST_info("%s is fetched", alg);
548 static int cipher_test_init(EVP_TEST *t, const char *alg)
555 if (is_cipher_disabled(alg)) {
557 TEST_info("skipping, '%s' is disabled", alg);
562 if ((cipher = fetched_cipher = EVP_CIPHER_fetch(libctx, alg, NULL)) == NULL
563 && (cipher = EVP_get_cipherbyname(alg)) == NULL) {
565 if (strstr(alg, "HMAC") != NULL) {
568 TEST_info("skipping, '%s' is not available", alg);
590 TEST_info("%s is fetched", alg);
1115 char *alg;
1145 static int mac_test_init(EVP_TEST *t, const char *alg)
1151 if (is_mac_disabled(alg)) {
1152 TEST_info("skipping, '%s' is disabled", alg);
1156 if ((mac = EVP_MAC_fetch(libctx, alg, NULL)) == NULL) {
1162 size_t sz = strlen(alg);
1166 && strcmp(alg + sz - (sizeof(epilogue) - 1), epilogue) == 0)
1169 if (strncmp(alg, "HMAC", sz) == 0)
1171 else if (strncmp(alg, "CMAC", sz) == 0)
1173 else if (strncmp(alg, "Poly1305", sz) == 0)
1175 else if (strncmp(alg, "SipHash", sz) == 0)
1185 if (!TEST_ptr(mdat->mac_name = OPENSSL_strdup(alg))) {
1215 OPENSSL_free(mdat->alg);
1238 mdata->alg = OPENSSL_strdup(value);
1239 if (mdata->alg == NULL)
1312 if (expected->alg == NULL)
1316 OBJ_nid2sn(expected->type), expected->alg);
1320 TEST_info("skipping, PKEY CMAC '%s' is disabled", expected->alg);
1327 if (expected->alg != NULL && is_cipher_disabled(expected->alg)) {
1328 TEST_info("skipping, PKEY CMAC '%s' is disabled", expected->alg);
1333 if (!TEST_ptr(cipher = EVP_CIPHER_fetch(libctx, expected->alg, NULL))) {
1352 if (expected->type == EVP_PKEY_HMAC && expected->alg != NULL) {
1353 if (is_digest_disabled(expected->alg)) {
1354 TEST_info("skipping, HMAC '%s' is disabled", expected->alg);
1359 mdname = expected->alg;
1420 if (expected->alg == NULL)
1424 expected->mac_name, expected->alg);
1426 if (expected->alg != NULL) {
1436 if (is_cipher_disabled(expected->alg))
1441 expected->alg, 0);
1444 if (is_digest_disabled(expected->alg))
1449 expected->alg, 0);
1455 TEST_info("skipping, algorithm '%s' is disabled", expected->alg);
1618 expected->alg, params,
2114 static int pbe_test_init(EVP_TEST *t, const char *alg)
2119 if (is_kdf_disabled(alg)) {
2120 TEST_info("skipping, '%s' is disabled", alg);
2124 if (strcmp(alg, "scrypt") == 0) {
2126 } else if (strcmp(alg, "pbkdf2") == 0) {
2128 } else if (strcmp(alg, "pkcs12") == 0) {
2131 TEST_error("Unknown pbe algorithm %s", alg);
3059 static int keygen_test_init(EVP_TEST *t, const char *alg)
3063 int nid = OBJ_sn2nid(alg);
3066 nid = OBJ_ln2nid(alg);
3071 if (is_pkey_disabled(alg)) {
3075 if (!TEST_ptr(genctx = EVP_PKEY_CTX_new_from_name(libctx, alg, NULL)))
3185 static int digestsigver_test_init(EVP_TEST *t, const char *alg, int is_verify,
3191 if (strcmp(alg, "NULL") != 0) {
3192 if (is_digest_disabled(alg)) {
3196 md = EVP_get_digestbyname(alg);
3213 static int digestsign_test_init(EVP_TEST *t, const char *alg)
3215 return digestsigver_test_init(t, alg, 0, 0);
3332 static int digestverify_test_init(EVP_TEST *t, const char *alg)
3334 return digestsigver_test_init(t, alg, 1, 0);
3366 static int oneshot_digestsign_test_init(EVP_TEST *t, const char *alg)
3368 return digestsigver_test_init(t, alg, 0, 1);
3411 static int oneshot_digestverify_test_init(EVP_TEST *t, const char *alg)
3413 return digestsigver_test_init(t, alg, 1, 1);