Module Name: src
Committed By: christos
Date: Tue Feb 6 19:51:03 UTC 2018
Modified Files:
src/usr.bin/nbsvtool: Makefile nbsvtool.c
Log Message:
use OpenSSL-1.1 apis
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/nbsvtool/Makefile
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/nbsvtool/nbsvtool.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/nbsvtool/Makefile
diff -u src/usr.bin/nbsvtool/Makefile:1.1 src/usr.bin/nbsvtool/Makefile:1.2
--- src/usr.bin/nbsvtool/Makefile:1.1 Sun May 11 13:58:09 2008
+++ src/usr.bin/nbsvtool/Makefile Tue Feb 6 14:51:03 2018
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2008/05/11 17:58:09 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2018/02/06 19:51:03 christos Exp $
PROG= nbsvtool
LDADD+= -lcrypto
DPADD+= ${LIBCRYPTO}
+CPPFLAGS+=-DOPENSSL_VERSION_NUMBER=0x10100000L
.include <bsd.prog.mk>
Index: src/usr.bin/nbsvtool/nbsvtool.c
diff -u src/usr.bin/nbsvtool/nbsvtool.c:1.2 src/usr.bin/nbsvtool/nbsvtool.c:1.3
--- src/usr.bin/nbsvtool/nbsvtool.c:1.2 Wed Jun 11 12:31:09 2008
+++ src/usr.bin/nbsvtool/nbsvtool.c Tue Feb 6 14:51:03 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: nbsvtool.c,v 1.2 2008/06/11 16:31:09 joerg Exp $ */
+/* $NetBSD: nbsvtool.c,v 1.3 2018/02/06 19:51:03 christos Exp $ */
/*-
* Copyright (c) 2004, 2008 The NetBSD Foundation, Inc.
@@ -148,10 +148,11 @@ verify_file(STACK_OF(X509) *cert_chain,
if (key_usage != 0) {
for (i = 0; i < sk_X509_num(signers); i++) {
- if ((sk_X509_value(signers, i)->ex_xkusage & key_usage)
+ X509 *x = sk_X509_value(signers, i);
+ if ((X509_get_extended_key_usage(x) & key_usage)
== key_usage)
continue;
- name = X509_get_subject_name(sk_X509_value(signers, i));
+ name = X509_get_subject_name(x);
subject = X509_NAME_oneline(name, NULL, 0);
errx(EXIT_FAILURE,
"Certificate doesn't match required key usage: %s",