CVS commit: src/usr.bin/nbsvtool
Module Name:src Committed By: christos Date: Tue Feb 6 20:15:39 UTC 2018 Modified Files: src/usr.bin/nbsvtool: nbsvtool.c Log Message: mark old compat functions. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 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/nbsvtool.c diff -u src/usr.bin/nbsvtool/nbsvtool.c:1.3 src/usr.bin/nbsvtool/nbsvtool.c:1.4 --- src/usr.bin/nbsvtool/nbsvtool.c:1.3 Tue Feb 6 14:51:03 2018 +++ src/usr.bin/nbsvtool/nbsvtool.c Tue Feb 6 15:15:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nbsvtool.c,v 1.3 2018/02/06 19:51:03 christos Exp $ */ +/* $NetBSD: nbsvtool.c,v 1.4 2018/02/06 20:15:39 christos Exp $ */ /*- * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. @@ -309,8 +309,10 @@ main(int argc, char **argv) setprogname(argv[0]); +#if OPENSSL_VERSION_NUMBER < 0x1010L OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); +#endif while ((ch = getopt(argc, argv, "a:c:f:hk:u:v")) != -1) { switch (ch) {
CVS commit: src/usr.bin/nbsvtool
Module Name:src Committed By: christos Date: Tue Feb 6 20:10:05 UTC 2018 Modified Files: src/usr.bin/nbsvtool: Makefile Log Message: use OPENSSL_API_COMPAT To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/nbsvtool/Makefile 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.2 src/usr.bin/nbsvtool/Makefile:1.3 --- src/usr.bin/nbsvtool/Makefile:1.2 Tue Feb 6 14:51:03 2018 +++ src/usr.bin/nbsvtool/Makefile Tue Feb 6 15:10:05 2018 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2018/02/06 19:51:03 christos Exp $ +# $NetBSD: Makefile,v 1.3 2018/02/06 20:10:05 christos Exp $ PROG= nbsvtool LDADD+= -lcrypto DPADD+= ${LIBCRYPTO} -CPPFLAGS+=-DOPENSSL_VERSION_NUMBER=0x1010L +CPPFLAGS+=-DOPENSSL_API_COMPAT=0x1010L .include
CVS commit: src/usr.bin/nbsvtool
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=0x1010L .include 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",
CVS commit: src/usr.bin/nbsvtool
Module Name:src Committed By: wiz Date: Thu Apr 28 17:14:45 UTC 2011 Modified Files: src/usr.bin/nbsvtool: nbsvtool.1 Log Message: New sentence, new line. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/nbsvtool/nbsvtool.1 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/nbsvtool.1 diff -u src/usr.bin/nbsvtool/nbsvtool.1:1.5 src/usr.bin/nbsvtool/nbsvtool.1:1.6 --- src/usr.bin/nbsvtool/nbsvtool.1:1.5 Wed Mar 11 13:54:20 2009 +++ src/usr.bin/nbsvtool/nbsvtool.1 Thu Apr 28 17:14:45 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: nbsvtool.1,v 1.5 2009/03/11 13:54:20 joerg Exp $ +.\ $NetBSD: nbsvtool.1,v 1.6 2011/04/28 17:14:45 wiz Exp $ .\ .\ Copyright (c) 2004-2008 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -128,8 +128,8 @@ .Pa hello.sp7 is valid for file .Pa hello -and that the signing certificate allows code signing. Certificates -in +and that the signing certificate allows code signing. +Certificates in .Pa anchor-file are considered trusted, and there must be a certificate chain from one of those certificates to the signing certificate.