Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/nbsvtool use OpenSSL-1.1 apis
details: https://anonhg.NetBSD.org/src/rev/57877707f848
branches: trunk
changeset: 359301:57877707f848
user: christos <christos%NetBSD.org@localhost>
date: Tue Feb 06 19:51:03 2018 +0000
description:
use OpenSSL-1.1 apis
diffstat:
usr.bin/nbsvtool/Makefile | 3 ++-
usr.bin/nbsvtool/nbsvtool.c | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 3e42af416c7f -r 57877707f848 usr.bin/nbsvtool/Makefile
--- a/usr.bin/nbsvtool/Makefile Tue Feb 06 19:32:49 2018 +0000
+++ b/usr.bin/nbsvtool/Makefile Tue Feb 06 19:51:03 2018 +0000
@@ -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>
diff -r 3e42af416c7f -r 57877707f848 usr.bin/nbsvtool/nbsvtool.c
--- a/usr.bin/nbsvtool/nbsvtool.c Tue Feb 06 19:32:49 2018 +0000
+++ b/usr.bin/nbsvtool/nbsvtool.c Tue Feb 06 19:51:03 2018 +0000
@@ -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 @@
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",
Home |
Main Index |
Thread Index |
Old Index