diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2019-08-12 18:03:18 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2019-08-12 18:03:18 +0000 |
commit | 754f0ebc7b197a518630fdc72865cb4e45e21d07 (patch) | |
tree | cf7225d7904f4d31e07d7cd2531fde00693c2ad6 /regress | |
parent | 4dcb9eaa77fece297f909cdcf7526dcc5a397fc9 (diff) |
Stop pulling libssl into rpki-client.
None of this code actually does TLS, hence libssl is not needed. Instead,
pull in the correct headers and call the appropriate libcrypto
initialisation functions (even this is only necessary to support OpenSSL
prior to 1.1).
While here also remove libssl/libcrypto initialisation/uninitialisation
from main() - it should only be necessary in proc_parser().
ok deraadt@ job@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.sbin/rpki-client/Makefile | 5 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-cert.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-ip.c | 11 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-mft.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-roa.c | 10 | ||||
-rw-r--r-- | regress/usr.sbin/rpki-client/test-tal.c | 10 |
6 files changed, 32 insertions, 24 deletions
diff --git a/regress/usr.sbin/rpki-client/Makefile b/regress/usr.sbin/rpki-client/Makefile index 00d30037840..fafda6ca609 100644 --- a/regress/usr.sbin/rpki-client/Makefile +++ b/regress/usr.sbin/rpki-client/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2019/06/19 12:33:36 claudio Exp $ +# $OpenBSD: Makefile,v 1.4 2019/08/12 18:03:17 jsing Exp $ .PATH: ${.CURDIR}/../../../usr.sbin/rpki-client @@ -20,8 +20,7 @@ REGRESS_TARGETS += run-regress-$p CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../../usr.sbin/rpki-client \ -I/usr/local/include/eopenssl -LDADD+= /usr/local/lib/eopenssl/libssl.a \ - /usr/local/lib/eopenssl/libcrypto.a +LDADD+= /usr/local/lib/eopenssl/libcrypto.a SRCS_test-ip= test-ip.c ip.c io.c run-regress-test-ip: test-ip diff --git a/regress/usr.sbin/rpki-client/test-cert.c b/regress/usr.sbin/rpki-client/test-cert.c index 733f1da4219..f06d530b0cc 100644 --- a/regress/usr.sbin/rpki-client/test-cert.c +++ b/regress/usr.sbin/rpki-client/test-cert.c @@ -1,4 +1,4 @@ -/* $Id: test-cert.c,v 1.1 2019/06/18 12:09:07 claudio Exp $ */ +/* $Id: test-cert.c,v 1.2 2019/08/12 18:03:17 jsing Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -27,7 +27,8 @@ #include <unistd.h> #include <openssl/err.h> -#include <openssl/ssl.h> +#include <openssl/evp.h> +#include <openssl/x509v3.h> #include "extern.h" @@ -90,8 +91,9 @@ main(int argc, char *argv[]) X509 *xp = NULL; struct cert *p; - SSL_library_init(); - SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); while ((c = getopt(argc, argv, "tv")) != -1) switch (c) { diff --git a/regress/usr.sbin/rpki-client/test-ip.c b/regress/usr.sbin/rpki-client/test-ip.c index d9ab3e27dc1..e53b40a943d 100644 --- a/regress/usr.sbin/rpki-client/test-ip.c +++ b/regress/usr.sbin/rpki-client/test-ip.c @@ -1,4 +1,4 @@ -/* $Id: test-ip.c,v 1.2 2019/06/19 15:49:54 claudio Exp $ */ +/* $Id: test-ip.c,v 1.3 2019/08/12 18:03:17 jsing Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -26,7 +26,8 @@ #include <unistd.h> #include <openssl/err.h> -#include <openssl/ssl.h> +#include <openssl/evp.h> +#include <openssl/x509v3.h> #include "extern.h" @@ -75,9 +76,9 @@ test(const char *res, uint16_t afiv, size_t sz, size_t unused, ...) int main(int argc, char *argv[]) { - - SSL_library_init(); - SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); test("10.5.0.4/32", 1, 0x04, 0x00, 0x0a, 0x05, 0x00, 0x04); diff --git a/regress/usr.sbin/rpki-client/test-mft.c b/regress/usr.sbin/rpki-client/test-mft.c index 4df01911444..2b29c7613b1 100644 --- a/regress/usr.sbin/rpki-client/test-mft.c +++ b/regress/usr.sbin/rpki-client/test-mft.c @@ -1,4 +1,4 @@ -/* $Id: test-mft.c,v 1.1 2019/06/18 12:09:07 claudio Exp $ */ +/* $Id: test-mft.c,v 1.2 2019/08/12 18:03:17 jsing Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -24,7 +24,8 @@ #include <unistd.h> #include <openssl/err.h> -#include <openssl/ssl.h> +#include <openssl/evp.h> +#include <openssl/x509v3.h> #include "extern.h" @@ -49,8 +50,9 @@ main(int argc, char *argv[]) struct mft *p; X509 *xp = NULL; - SSL_library_init(); - SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); while (-1 != (c = getopt(argc, argv, "fv"))) switch (c) { diff --git a/regress/usr.sbin/rpki-client/test-roa.c b/regress/usr.sbin/rpki-client/test-roa.c index dba1c66d6fd..c31241bab0e 100644 --- a/regress/usr.sbin/rpki-client/test-roa.c +++ b/regress/usr.sbin/rpki-client/test-roa.c @@ -1,4 +1,4 @@ -/* $Id: test-roa.c,v 1.1 2019/06/18 12:09:07 claudio Exp $ */ +/* $Id: test-roa.c,v 1.2 2019/08/12 18:03:17 jsing Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -24,7 +24,8 @@ #include <unistd.h> #include <openssl/err.h> -#include <openssl/ssl.h> +#include <openssl/evp.h> +#include <openssl/x509v3.h> #include "extern.h" @@ -54,8 +55,9 @@ main(int argc, char *argv[]) X509 *xp = NULL; struct roa *p; - SSL_library_init(); - SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); while ((c = getopt(argc, argv, "v")) != -1) switch (c) { diff --git a/regress/usr.sbin/rpki-client/test-tal.c b/regress/usr.sbin/rpki-client/test-tal.c index d8e99f089fd..9ed011390a5 100644 --- a/regress/usr.sbin/rpki-client/test-tal.c +++ b/regress/usr.sbin/rpki-client/test-tal.c @@ -1,4 +1,4 @@ -/* $Id: test-tal.c,v 1.1 2019/06/18 12:09:07 claudio Exp $ */ +/* $Id: test-tal.c,v 1.2 2019/08/12 18:03:17 jsing Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -24,7 +24,8 @@ #include <unistd.h> #include <openssl/err.h> -#include <openssl/ssl.h> +#include <openssl/evp.h> +#include <openssl/x509v3.h> #include "extern.h" @@ -45,8 +46,9 @@ main(int argc, char *argv[]) int c, i, verb = 0; struct tal *tal; - SSL_library_init(); - SSL_load_error_strings(); + ERR_load_crypto_strings(); + OpenSSL_add_all_ciphers(); + OpenSSL_add_all_digests(); while (-1 != (c = getopt(argc, argv, "v"))) switch (c) { |