summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/interop/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libssl/interop/util.c')
-rw-r--r--src/regress/lib/libssl/interop/util.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/regress/lib/libssl/interop/util.c b/src/regress/lib/libssl/interop/util.c
index 3f1c221d51..b012d73193 100644
--- a/src/regress/lib/libssl/interop/util.c
+++ b/src/regress/lib/libssl/interop/util.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: util.c,v 1.1.1.1 2018/11/07 01:08:49 bluhm Exp $ */ 1/* $OpenBSD: util.c,v 1.2 2018/11/07 06:29:26 bluhm Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org> 3 * Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
4 * 4 *
@@ -24,13 +24,55 @@
24 24
25#include <openssl/err.h> 25#include <openssl/err.h>
26#include <openssl/ssl.h> 26#include <openssl/ssl.h>
27#include <openssl/opensslv.h>
28#include <openssl/crypto.h>
27 29
28#include "util.h" 30#include "util.h"
29 31
30void 32void
33print_version(void)
34{
35#ifdef OPENSSL_VERSION_NUMBER
36 printf("OPENSSL_VERSION_NUMBER: %#08lx\n", OPENSSL_VERSION_NUMBER);
37#endif
38#ifdef LIBRESSL_VERSION_NUMBER
39 printf("LIBRESSL_VERSION_NUMBER: %#08lx\n", LIBRESSL_VERSION_NUMBER);
40#endif
41#ifdef LIBRESSL_VERSION_TEXT
42 printf("LIBRESSL_VERSION_TEXT: %s\n", LIBRESSL_VERSION_TEXT);
43#endif
44#if OPENSSL_VERSION_NUMBER >= 0x1010000f
45 printf("OpenSSL_version_num: %#08lx\n", OpenSSL_version_num());
46 printf("OpenSSL_version OPENSSL_VERSION: %s\n",
47 OpenSSL_version(OPENSSL_VERSION));
48 printf("OpenSSL_version OPENSSL_CFLAGS: %s\n",
49 OpenSSL_version(OPENSSL_CFLAGS));
50 printf("OpenSSL_version OPENSSL_BUILT_ON: %s\n",
51 OpenSSL_version(OPENSSL_BUILT_ON));
52 printf("OpenSSL_version OPENSSL_PLATFORM: %s\n",
53 OpenSSL_version(OPENSSL_PLATFORM));
54 printf("OpenSSL_version OPENSSL_DIR: %s\n",
55 OpenSSL_version(OPENSSL_DIR));
56 printf("OpenSSL_version OPENSSL_ENGINES_DIR: %s\n",
57 OpenSSL_version(OPENSSL_ENGINES_DIR));
58#endif
59 printf("SSLeay: %#08lx\n", SSLeay());
60 printf("SSLeay_version SSLEAY_VERSION: %s\n",
61 SSLeay_version(SSLEAY_VERSION));
62 printf("SSLeay_version SSLEAY_CFLAGS: %s\n",
63 SSLeay_version(SSLEAY_CFLAGS));
64 printf("SSLeay_version SSLEAY_BUILT_ON: %s\n",
65 SSLeay_version(SSLEAY_BUILT_ON));
66 printf("SSLeay_version SSLEAY_PLATFORM: %s\n",
67 SSLeay_version(SSLEAY_PLATFORM));
68 printf("SSLeay_version SSLEAY_DIR: %s\n",
69 SSLeay_version(SSLEAY_DIR));
70}
71
72void
31print_ciphers(STACK_OF(SSL_CIPHER) *cstack) 73print_ciphers(STACK_OF(SSL_CIPHER) *cstack)
32{ 74{
33 SSL_CIPHER *cipher; 75 const SSL_CIPHER *cipher;
34 int i; 76 int i;
35 77
36 for (i = 0; (cipher = sk_SSL_CIPHER_value(cstack, i)) != NULL; i++) 78 for (i = 0; (cipher = sk_SSL_CIPHER_value(cstack, i)) != NULL; i++)