diff options
Diffstat (limited to 'src/regress/lib')
| -rw-r--r-- | src/regress/lib/libcrypto/ec/Makefile | 8 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/ec/ec_asn1_test.c | 11 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/ec/Makefile b/src/regress/lib/libcrypto/ec/Makefile index 0826b44a25..20d2a90318 100644 --- a/src/regress/lib/libcrypto/ec/Makefile +++ b/src/regress/lib/libcrypto/ec/Makefile | |||
| @@ -1,4 +1,10 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.8 2023/04/17 20:41:02 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.9 2024/11/04 09:51:51 tb Exp $ |
| 2 | |||
| 3 | .ifdef EOPENSSL33 | ||
| 4 | LDADD += -Wl,-rpath,/usr/local/lib/eopenssl33 -L/usr/local/lib/eopenssl33 | ||
| 5 | CFLAGS += -I/usr/local/include/eopenssl33/ | ||
| 6 | CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED | ||
| 7 | .endif | ||
| 2 | 8 | ||
| 3 | PROGS += ectest | 9 | PROGS += ectest |
| 4 | PROGS += ec_asn1_test | 10 | PROGS += ec_asn1_test |
diff --git a/src/regress/lib/libcrypto/ec/ec_asn1_test.c b/src/regress/lib/libcrypto/ec/ec_asn1_test.c index 5902ee3d3b..539d00b7b5 100644 --- a/src/regress/lib/libcrypto/ec/ec_asn1_test.c +++ b/src/regress/lib/libcrypto/ec/ec_asn1_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_asn1_test.c,v 1.26 2024/11/02 13:42:49 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1_test.c,v 1.27 2024/11/04 09:51:51 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> |
| @@ -16,6 +16,8 @@ | |||
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include <sys/resource.h> | ||
| 20 | |||
| 19 | #include <err.h> | 21 | #include <err.h> |
| 20 | #include <string.h> | 22 | #include <string.h> |
| 21 | 23 | ||
| @@ -884,7 +886,9 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method, | |||
| 884 | EC_GROUP *group = NULL, *new_group = NULL; | 886 | EC_GROUP *group = NULL, *new_group = NULL; |
| 885 | const unsigned char *pder; | 887 | const unsigned char *pder; |
| 886 | unsigned char *der = NULL; | 888 | unsigned char *der = NULL; |
| 889 | #ifndef OPENSSL_SUPPRESS_DEPRECATED | ||
| 887 | long error; | 890 | long error; |
| 891 | #endif | ||
| 888 | int der_len = 0; | 892 | int der_len = 0; |
| 889 | int failed = 1; | 893 | int failed = 1; |
| 890 | 894 | ||
| @@ -952,7 +956,7 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method, | |||
| 952 | } | 956 | } |
| 953 | EC_GROUP_free(new_group); | 957 | EC_GROUP_free(new_group); |
| 954 | new_group = NULL; | 958 | new_group = NULL; |
| 955 | 959 | #ifndef OPENSSL_SUPPRESS_DEPRECATED | |
| 956 | error = ERR_get_error(); | 960 | error = ERR_get_error(); |
| 957 | if (!curve->known_named_curve && | 961 | if (!curve->known_named_curve && |
| 958 | ERR_GET_REASON(error) != EC_R_UNKNOWN_GROUP) { | 962 | ERR_GET_REASON(error) != EC_R_UNKNOWN_GROUP) { |
| @@ -960,6 +964,7 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method, | |||
| 960 | curve->descr, EC_R_UNKNOWN_GROUP, ERR_GET_REASON(error)); | 964 | curve->descr, EC_R_UNKNOWN_GROUP, ERR_GET_REASON(error)); |
| 961 | goto err; | 965 | goto err; |
| 962 | } | 966 | } |
| 967 | #endif | ||
| 963 | 968 | ||
| 964 | ERR_clear_error(); | 969 | ERR_clear_error(); |
| 965 | 970 | ||
| @@ -971,12 +976,14 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method, | |||
| 971 | goto err; | 976 | goto err; |
| 972 | } | 977 | } |
| 973 | 978 | ||
| 979 | #ifndef OPENSSL_SUPPRESS_DEPRECATED | ||
| 974 | error = ERR_peek_last_error(); | 980 | error = ERR_peek_last_error(); |
| 975 | if (ERR_GET_REASON(error) != EC_R_PKPARAMETERS2GROUP_FAILURE) { | 981 | if (ERR_GET_REASON(error) != EC_R_PKPARAMETERS2GROUP_FAILURE) { |
| 976 | fprintf(stderr, "FAIL: %s unexpected error: want %d, got %d\n", | 982 | fprintf(stderr, "FAIL: %s unexpected error: want %d, got %d\n", |
| 977 | curve->descr, EC_R_UNKNOWN_GROUP, ERR_GET_REASON(error)); | 983 | curve->descr, EC_R_UNKNOWN_GROUP, ERR_GET_REASON(error)); |
| 978 | goto err; | 984 | goto err; |
| 979 | } | 985 | } |
| 986 | #endif | ||
| 980 | 987 | ||
| 981 | failed = 0; | 988 | failed = 0; |
| 982 | 989 | ||
