diff options
| author | tb <> | 2024-01-11 16:45:26 +0000 |
|---|---|---|
| committer | tb <> | 2024-01-11 16:45:26 +0000 |
| commit | 11bbbc8e1d1d1cf5984fb74c05165cd1cfb0251c (patch) | |
| tree | 4aaac2caf20c309eefd04eb162587e38852ff9e3 | |
| parent | a240348636f7bae461e18511e7bf1a9a0f5a2b16 (diff) | |
| download | openbsd-11bbbc8e1d1d1cf5984fb74c05165cd1cfb0251c.tar.gz openbsd-11bbbc8e1d1d1cf5984fb74c05165cd1cfb0251c.tar.bz2 openbsd-11bbbc8e1d1d1cf5984fb74c05165cd1cfb0251c.zip | |
Remove the evp_pkey_method() test
This is a minimal test for an API that will be removed in a subsequent
commit.
| -rw-r--r-- | src/regress/lib/libcrypto/evp/evp_test.c | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/src/regress/lib/libcrypto/evp/evp_test.c b/src/regress/lib/libcrypto/evp/evp_test.c index ec6a9435ff..ef11089d2c 100644 --- a/src/regress/lib/libcrypto/evp/evp_test.c +++ b/src/regress/lib/libcrypto/evp/evp_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_test.c,v 1.13 2023/12/31 01:31:07 tb Exp $ */ | 1 | /* $OpenBSD: evp_test.c,v 1.14 2024/01/11 16:45:26 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> |
| @@ -260,42 +260,6 @@ evp_asn1_method_aliases_test(void) | |||
| 260 | return failed; | 260 | return failed; |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | static int | ||
| 264 | evp_pkey_method_test(void) | ||
| 265 | { | ||
| 266 | const EVP_PKEY_METHOD *method; | ||
| 267 | int pkey_id; | ||
| 268 | int failed = 1; | ||
| 269 | |||
| 270 | if ((method = EVP_PKEY_meth_find(EVP_PKEY_RSA)) == NULL) { | ||
| 271 | fprintf(stderr, "FAIL: failed to find RSA method\n"); | ||
| 272 | goto failure; | ||
| 273 | } | ||
| 274 | EVP_PKEY_meth_get0_info(&pkey_id, NULL, method); | ||
| 275 | if (pkey_id != EVP_PKEY_RSA) { | ||
| 276 | fprintf(stderr, "FAIL: method ID mismatch (%d != %d)\n", | ||
| 277 | pkey_id, EVP_PKEY_RSA); | ||
| 278 | goto failure; | ||
| 279 | } | ||
| 280 | |||
| 281 | if ((method = EVP_PKEY_meth_find(EVP_PKEY_RSA_PSS)) == NULL) { | ||
| 282 | fprintf(stderr, "FAIL: failed to find RSA-PSS method\n"); | ||
| 283 | goto failure; | ||
| 284 | } | ||
| 285 | EVP_PKEY_meth_get0_info(&pkey_id, NULL, method); | ||
| 286 | if (pkey_id != EVP_PKEY_RSA_PSS) { | ||
| 287 | fprintf(stderr, "FAIL: method ID mismatch (%d != %d)\n", | ||
| 288 | pkey_id, EVP_PKEY_RSA_PSS); | ||
| 289 | goto failure; | ||
| 290 | } | ||
| 291 | |||
| 292 | failed = 0; | ||
| 293 | |||
| 294 | failure: | ||
| 295 | |||
| 296 | return failed; | ||
| 297 | } | ||
| 298 | |||
| 299 | static const struct evp_iv_len_test { | 263 | static const struct evp_iv_len_test { |
| 300 | const EVP_CIPHER *(*cipher)(void); | 264 | const EVP_CIPHER *(*cipher)(void); |
| 301 | int iv_len; | 265 | int iv_len; |
| @@ -789,7 +753,6 @@ main(int argc, char **argv) | |||
| 789 | 753 | ||
| 790 | failed |= evp_asn1_method_test(); | 754 | failed |= evp_asn1_method_test(); |
| 791 | failed |= evp_asn1_method_aliases_test(); | 755 | failed |= evp_asn1_method_aliases_test(); |
| 792 | failed |= evp_pkey_method_test(); | ||
| 793 | failed |= evp_pkey_iv_len_test(); | 756 | failed |= evp_pkey_iv_len_test(); |
| 794 | failed |= evp_do_all_test(); | 757 | failed |= evp_do_all_test(); |
| 795 | failed |= evp_aliases_test(); | 758 | failed |= evp_aliases_test(); |
