Compare commits
103
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc4612a76c | ||
|
|
c99496f6a8 | ||
|
|
59227dc277 | ||
|
|
1cfaf783e2 | ||
|
|
234acfeffe | ||
|
|
b4967c5735 | ||
|
|
9c4fb3b3e6 | ||
|
|
83a1e87dd2 | ||
|
|
5146cbc092 | ||
|
|
49cd3aac9c | ||
|
|
a94db46631 | ||
|
|
c3c0481293 | ||
|
|
69380eb033 | ||
|
|
2c816e745b | ||
|
|
10e6bfc864 | ||
|
|
84385bc717 | ||
|
|
d6d9fd1c71 | ||
|
|
9130f055f4 | ||
|
|
cfccd8d246 | ||
|
|
3ea9861e7a | ||
|
|
a71823bc5c | ||
|
|
7425252207 | ||
|
|
c0bd1bf944 | ||
|
|
12d45c5cd1 | ||
|
|
d30f6e5f99 | ||
|
|
abe41ba011 | ||
|
|
6b30bc73c0 | ||
|
|
f335795068 | ||
|
|
b0b76d259f | ||
|
|
57eadf4d4f | ||
|
|
fb8bb4e306 | ||
|
|
d7ae24c868 | ||
|
|
84f1d9a204 | ||
|
|
2e688488f7 | ||
|
|
d2943440a0 | ||
|
|
1a5620db01 | ||
|
|
63c9ec367f | ||
|
|
d9929b1b0a | ||
|
|
88f913ac81 | ||
|
|
8abf2f23d0 | ||
|
|
20faf4652a | ||
|
|
7785f644c3 | ||
|
|
519bfe4c97 | ||
|
|
6a6dc2f410 | ||
|
|
63aaff50df | ||
|
|
4093efc900 | ||
|
|
e91da20dc3 | ||
|
|
c8b07932e4 | ||
|
|
ebcaae4ae5 | ||
|
|
7671aba67d | ||
|
|
e7c34d5179 | ||
|
|
187d22e090 | ||
|
|
537f2284a3 | ||
|
|
71877806e8 | ||
|
|
e0d42538f9 | ||
|
|
083461d332 | ||
|
|
b105ccee68 | ||
|
|
66ba2fdad5 | ||
|
|
8b9b270c7d | ||
|
|
8e6d89ad97 | ||
|
|
4c3386ad95 | ||
|
|
7fc59e384c | ||
|
|
83cde08522 | ||
|
|
51f7ed99fe | ||
|
|
08974f39f1 | ||
|
|
fc496b2b5d | ||
|
|
919179b369 | ||
|
|
ed090fed56 | ||
|
|
0937e281a8 | ||
|
|
0a73c9f137 | ||
|
|
45abf438f8 | ||
|
|
c40425d0f6 | ||
|
|
9d1f4696ec | ||
|
|
c3b8130fe8 | ||
|
|
3322e41eeb | ||
|
|
d34aa0ccd0 | ||
|
|
f5cb3d707a | ||
|
|
1d8a62713d | ||
|
|
d5ec498e26 | ||
|
|
636e9fc259 | ||
|
|
8666f8d28f | ||
|
|
2975f37f1c | ||
|
|
378e36a955 | ||
|
|
5bf1e8781e | ||
|
|
48eedb8108 | ||
|
|
e10e6756c9 | ||
|
|
82082ecd56 | ||
|
|
122a1a00be | ||
|
|
c96ca40023 | ||
|
|
c8b36ea6b9 | ||
|
|
15db6ee6e4 | ||
|
|
618921902a | ||
|
|
229dfb5dc8 | ||
|
|
ae1aa55c6f | ||
|
|
939824fce5 | ||
|
|
f0966d1485 | ||
|
|
2be97feb46 | ||
|
|
fd30a03f2b | ||
|
|
cc0e8cda71 | ||
|
|
12df6829d1 | ||
|
|
45e77a3680 | ||
|
|
c08e60adcb | ||
|
|
6e06d3e7c6 |
+125
-3
@@ -2,7 +2,7 @@ variables:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
LC_ALL: C
|
||||
DOCKER_DRIVER: overlay2
|
||||
CI_REGISTRY_IMAGE: oerdnj/bind9
|
||||
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
|
||||
CCACHE_DIR: "/ccache"
|
||||
|
||||
stages:
|
||||
@@ -10,6 +10,20 @@ stages:
|
||||
- build
|
||||
- test
|
||||
|
||||
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.centos-centos7-amd64: ¢os_centos7_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-jessie-amd64: &debian_jessie_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
|
||||
tags:
|
||||
@@ -98,9 +112,9 @@ stages:
|
||||
stage: build
|
||||
before_script:
|
||||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||
- ./autogen.sh
|
||||
# - ./autogen.sh
|
||||
script:
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr $EXTRA_CONFIGURE
|
||||
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
|
||||
artifacts:
|
||||
expire_in: '1 hour'
|
||||
@@ -111,6 +125,9 @@ stages:
|
||||
before_script:
|
||||
- rm -rf .ccache
|
||||
- bash -x bin/tests/system/ifconfig.sh up
|
||||
- export SOFTHSM_CONF="/tmp/softhsm.conf"
|
||||
- echo "0:/tmp/softhsm.db" > $SOFTHSM_CONF
|
||||
- if command -v softhsm2-util >/dev/null; then softhsm2-util --init-token --free --pin 0000 --so-pin 0000 --label "softhsm"; fi
|
||||
script:
|
||||
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
||||
- test -s bin/tests/system/systests.output
|
||||
@@ -123,6 +140,9 @@ stages:
|
||||
stage: test
|
||||
before_script:
|
||||
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
||||
- export SOFTHSM_CONF="/tmp/softhsm.conf"
|
||||
- echo "0:/tmp/softhsm.db" > $SOFTHSM_CONF
|
||||
- if command -v softhsm2-util >/dev/null; then softhsm2-util --init-token --free --pin 0000 --so-pin 0000 --label "softhsm"; fi
|
||||
script:
|
||||
- make unit
|
||||
after_script:
|
||||
@@ -178,17 +198,49 @@ precheck:debian:sid:amd64:
|
||||
# <<: *ubuntu_xenial_i386_image
|
||||
# <<: *build_job
|
||||
|
||||
build:centos:centos6:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:centos:centos7:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:clang:debian:sid:amd64:
|
||||
variables:
|
||||
CC: clang-6.0
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:jessie:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:stretch:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -196,6 +248,7 @@ build:clang:debian:sid:i386:
|
||||
variables:
|
||||
CC: clang-6.0
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -203,9 +256,34 @@ build:debian:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
unittest:centos:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:centos:centos6:amd64
|
||||
|
||||
unittest:centos:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:centos:centos7:amd64
|
||||
|
||||
unittest:debian:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:jessie:amd64
|
||||
|
||||
unittest:debian:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:stretch:amd64
|
||||
|
||||
unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
@@ -224,6 +302,30 @@ unittest:debian:sid:i386:
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
systemtest:centos:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:centos:centos6:amd64
|
||||
|
||||
systemtest:centos:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:centos:centos7:amd64
|
||||
|
||||
systemtest:debian:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:jessie:amd64
|
||||
|
||||
systemtest:debian:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:stretch:amd64
|
||||
|
||||
systemtest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
@@ -235,3 +337,23 @@ systemtest:debian:sid:i386:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
pkcs11:build:debian:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
pkcs11:unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:build:debian:sid:amd64
|
||||
|
||||
pkcs11:systemtest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:build:debian:sid:amd64
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
4996. [bug] dig: Handle malformed ednsopt options. [GL #403]
|
||||
5005. [bug] dnssec-verify, and dnssec-signzone at the verification
|
||||
step, failed on some validly signed zones. [GL #442]
|
||||
|
||||
5004. [bug] 'rndc reconfig' could cause inline zones to stop
|
||||
re-signing. [GL #439]
|
||||
|
||||
5003. [bug] dns_acl_isinsecure did not handle geoip elements.
|
||||
[GL #406]
|
||||
|
||||
5002. [bug] mdig: Handle malformed +ednsopt option, support 100
|
||||
+ednsopt options per query rather than 100 total and
|
||||
address memory leaks if +ednsopt was specified.
|
||||
[GL #410]
|
||||
|
||||
5001. [bug] Fix refcount errors on error paths. [GL !563]
|
||||
|
||||
5000. [bug] named_server_servestale() could leave the server in
|
||||
exclusive mode if an error occured. [GL #441]
|
||||
|
||||
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
|
||||
[GL #261]
|
||||
|
||||
4998. [test] Make resolver and cacheclean tests more civilized.
|
||||
|
||||
4997. [placeholder]
|
||||
|
||||
4996. [bug] dig: Handle malformed +ednsopt option. [GL #403]
|
||||
|
||||
4995. [test] Add tests for "tcp-self" update policy. [GL !282]
|
||||
|
||||
|
||||
@@ -121,12 +121,6 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
/** define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if OpenSSL includes DSA support */
|
||||
#undef HAVE_OPENSSL_DSA
|
||||
|
||||
/* Define if you have getpassphrase in the C library. */
|
||||
#undef HAVE_GETPASSPHRASE
|
||||
|
||||
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
|
||||
#undef ISC_SOCKADDR_LEN_T
|
||||
|
||||
|
||||
Vendored
+16
-15
@@ -1,6 +1,6 @@
|
||||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@@ -12,9 +12,9 @@
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 12 (pkg-config-0.29.2)
|
||||
|
||||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
dnl serial 11 (pkg-config-0.29.1)
|
||||
dnl
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
@@ -55,7 +55,7 @@ dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
@@ -156,7 +156,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $2])
|
||||
AC_MSG_CHECKING([for $1])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
@@ -166,11 +166,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
@@ -187,7 +187,7 @@ installed software in a non-standard prefix.
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
@@ -288,8 +288,9 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
m4_include([libtool.m4/libtool.m4])
|
||||
m4_include([libtool.m4/ltoptions.m4])
|
||||
m4_include([libtool.m4/ltsugar.m4])
|
||||
m4_include([libtool.m4/ltversion.m4])
|
||||
m4_include([libtool.m4/lt~obsolete.m4])
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
m4_include([m4/ltversion.m4])
|
||||
m4_include([m4/lt~obsolete.m4])
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# Run this script after modifying configure.in to generate configure
|
||||
autoreconf -i
|
||||
autoreconf -f -i
|
||||
|
||||
@@ -16,15 +16,15 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -80,7 +80,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -87,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -27,8 +27,8 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -102,7 +102,7 @@ main(int argc, char **argv) {
|
||||
int len = 0;
|
||||
int ch;
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -43,10 +43,8 @@
|
||||
const char *
|
||||
alg_totext(dns_secalg_t alg) {
|
||||
switch (alg) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
return "hmac-md5";
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
return "hmac-sha1";
|
||||
case DST_ALG_HMACSHA224:
|
||||
@@ -71,10 +69,8 @@ alg_fromtext(const char *name) {
|
||||
if (strncasecmp(p, "hmac-", 5) == 0)
|
||||
p = &name[5];
|
||||
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
if (strcasecmp(p, "md5") == 0)
|
||||
return DST_ALG_HMACMD5;
|
||||
#endif
|
||||
if (strcasecmp(p, "sha1") == 0)
|
||||
return DST_ALG_HMACSHA1;
|
||||
if (strcasecmp(p, "sha224") == 0)
|
||||
@@ -124,9 +120,7 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
dst_key_t *key = NULL;
|
||||
|
||||
switch (alg) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
case DST_ALG_HMACSHA224:
|
||||
case DST_ALG_HMACSHA256:
|
||||
|
||||
@@ -16,7 +16,7 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
@@ -24,8 +24,8 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ READLINE_LIB = @READLINE_LIB@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
@@ -27,8 +27,8 @@ CWARNINGS =
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
@@ -64,7 +64,7 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
LDFLAGS = @LIBIDN2_LDFLAGS@
|
||||
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
|
||||
|
||||
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
|
||||
|
||||
+1
-5
@@ -260,7 +260,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
printf(";; Query time: %ld msec\n", (long) diff / 1000);
|
||||
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
|
||||
time(&tnow);
|
||||
#if defined(ISC_PLATFORM_USETHREADS) && !defined(WIN32)
|
||||
#if !defined(WIN32)
|
||||
(void)localtime_r(&tnow, &tmnow);
|
||||
#else
|
||||
tmnow = *localtime(&tnow);
|
||||
@@ -1771,11 +1771,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
ptr = ptr2;
|
||||
ptr2 = ptr3;
|
||||
} else {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
#else
|
||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
||||
#endif
|
||||
digestbits = 0;
|
||||
}
|
||||
/* XXXONDREJ: FIXME */
|
||||
|
||||
+2
-6
@@ -84,7 +84,7 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -1032,14 +1032,12 @@ parse_hmac(const char *hmac) {
|
||||
|
||||
digestbits = 0;
|
||||
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
if (strcasecmp(buf, "hmac-md5") == 0) {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
} else if (strncasecmp(buf, "hmac-md5-", 9) == 0) {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
digestbits = parse_bits(&buf[9], "digest-bits [0..128]", 128);
|
||||
} else
|
||||
#endif
|
||||
if (strcasecmp(buf, "hmac-sha1") == 0) {
|
||||
hmacname = DNS_TSIG_HMACSHA1_NAME;
|
||||
digestbits = 0;
|
||||
@@ -1153,11 +1151,9 @@ setup_file_key(void) {
|
||||
}
|
||||
|
||||
switch (dst_key_alg(dstkey)) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
break;
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
hmacname = DNS_TSIG_HMACSHA1_NAME;
|
||||
break;
|
||||
@@ -1314,7 +1310,7 @@ setup_libs(void) {
|
||||
|
||||
debug("setup_libs()");
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -77,7 +77,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -15,15 +15,14 @@ VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
|
||||
-DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -1147,7 +1147,7 @@ main(int argc, char *argv[]) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -370,7 +370,7 @@ main(int argc, char **argv) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -310,7 +310,7 @@ main(int argc, char **argv) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -69,12 +69,9 @@ usage(void) {
|
||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||
fprintf(stderr, " -c class (default: IN)\n");
|
||||
fprintf(stderr, " -E <engine>:\n");
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, " path to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
fprintf(stderr, " name of an OpenSSL engine to use "
|
||||
"(default is \"pkcs11\")\n");
|
||||
#else
|
||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||
#endif
|
||||
@@ -124,11 +121,7 @@ main(int argc, char **argv) {
|
||||
const char *directory = NULL;
|
||||
const char *predecessor = NULL;
|
||||
dst_key_t *prevkey = NULL;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
char *classname = NULL;
|
||||
char *endp;
|
||||
dst_key_t *key = NULL;
|
||||
@@ -173,7 +166,7 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -388,20 +381,10 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||
"recommended.\nIf you still wish to "
|
||||
"use RSA (RSAMD5) please specify "
|
||||
"\"-a RSAMD5\"\n");
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"The use of RSA (RSAMD5) was disabled\n");
|
||||
if (freeit != NULL)
|
||||
free(freeit);
|
||||
return (1);
|
||||
} else if (strcasecmp(algname, "RSAMD5") == 0) {
|
||||
fprintf(stderr, "The use of RSAMD5 was disabled\n");
|
||||
#endif
|
||||
if (freeit != NULL)
|
||||
free(freeit);
|
||||
return (1);
|
||||
@@ -512,11 +495,6 @@ main(int argc, char **argv) {
|
||||
alg = dst_key_alg(prevkey);
|
||||
flags = dst_key_flags(prevkey);
|
||||
|
||||
#ifdef PK11_MD5_DISABLE
|
||||
if (alg == DST_ALG_RSAMD5)
|
||||
fatal("Key %s uses disabled RSAMD5", predecessor);
|
||||
#endif
|
||||
|
||||
dst_key_format(prevkey, keystr, sizeof(keystr));
|
||||
dst_key_getprivateformat(prevkey, &major, &minor);
|
||||
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
|
||||
@@ -606,7 +584,7 @@ main(int argc, char **argv) {
|
||||
|
||||
/* associate the key */
|
||||
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
"pkcs11",
|
||||
#else
|
||||
engine,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -106,12 +106,9 @@ usage(void) {
|
||||
fprintf(stderr, " -c <class>: (default: IN)\n");
|
||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||
fprintf(stderr, " -E <engine>:\n");
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, " path to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
fprintf(stderr, " name of an OpenSSL engine to use "
|
||||
"(default is \"pkcs11\")\n");
|
||||
#else
|
||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||
#endif
|
||||
@@ -216,11 +213,7 @@ main(int argc, char **argv) {
|
||||
dst_key_t *prevkey = NULL;
|
||||
isc_buffer_t buf;
|
||||
isc_log_t *log = NULL;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
dns_rdataclass_t rdclass;
|
||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||
int dbits = 0;
|
||||
@@ -247,7 +240,7 @@ main(int argc, char **argv) {
|
||||
if (argc == 1)
|
||||
usage();
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -523,23 +516,12 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||
"recommended.\nIf you still wish to "
|
||||
"use RSA (RSAMD5) please specify "
|
||||
"\"-a RSAMD5\"\n");
|
||||
INSIST(freeit == NULL);
|
||||
return (1);
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"The use of RSA (RSAMD5) was disabled\n");
|
||||
INSIST(freeit == NULL);
|
||||
return (1);
|
||||
} else if (strcasecmp(algname, "RSAMD5") == 0) {
|
||||
fprintf(stderr, "The use of RSAMD5 was disabled\n");
|
||||
INSIST(freeit == NULL);
|
||||
return (1);
|
||||
#endif
|
||||
} else {
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
@@ -552,10 +534,6 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PK11_MD5_DISABLE
|
||||
INSIST((alg != DNS_KEYALG_RSAMD5));
|
||||
#endif
|
||||
|
||||
if (!dst_algorithm_supported(alg)) {
|
||||
fatal("unsupported algorithm: %d", alg);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -49,12 +49,9 @@ usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
fprintf(stderr, " -E engine: specify OpenSSL engine "
|
||||
"(default \"pkcs11\")\n");
|
||||
#else
|
||||
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
||||
#endif
|
||||
@@ -75,11 +72,7 @@ usage(void) {
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
char const *filename = NULL;
|
||||
char *dir = NULL;
|
||||
char newname[1024], oldname[1024];
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,7 @@ usage(void) {
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "General options:\n");
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -127,11 +127,7 @@ printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
const char *filename = NULL;
|
||||
char *directory = NULL;
|
||||
char newname[1024];
|
||||
@@ -178,7 +174,7 @@ main(int argc, char **argv) {
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -789,7 +789,7 @@ hashlist_add_dns_name(hashlist_t *l, /*const*/ dns_name_t *name,
|
||||
|
||||
static int
|
||||
hashlist_comp(const void *a, const void *b) {
|
||||
return (isc_safe_memcompare(a, b, hash_length + 1));
|
||||
return (memcmp(a, b, hash_length + 1));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3131,12 +3131,9 @@ usage(void) {
|
||||
fprintf(stderr, "verify generated signatures\n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-E engine:\n");
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
|
||||
"(default is \"pkcs11\")\n");
|
||||
#else
|
||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
|
||||
#endif
|
||||
@@ -3229,11 +3226,7 @@ main(int argc, char *argv[]) {
|
||||
dns_dnsseckey_t *key;
|
||||
isc_result_t result, vresult;
|
||||
isc_log_t *log = NULL;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
isc_boolean_t free_output = ISC_FALSE;
|
||||
int tempfilelen = 0;
|
||||
dns_rdataclass_t rdclass;
|
||||
@@ -3286,7 +3279,7 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -150,12 +150,9 @@ usage(void) {
|
||||
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-E engine:\n");
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
|
||||
"(default is \"pkcs11\")\n");
|
||||
#else
|
||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
|
||||
#endif
|
||||
@@ -171,11 +168,7 @@ main(int argc, char *argv[]) {
|
||||
char *inputformatstr = NULL;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
char *classname = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
char *endp;
|
||||
@@ -212,7 +205,7 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -84,7 +84,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -94,7 +94,7 @@ set PYTHONPATH=.
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -81,7 +81,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -46,17 +46,17 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${NS_INCLUDES} ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
|
||||
${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
|
||||
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@
|
||||
CDEFINES = @CONTRIB_DLZ@
|
||||
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
|
||||
@@ -51,11 +51,7 @@ options {\n\
|
||||
automatic-interface-scan yes;\n\
|
||||
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
|
||||
# blackhole {none;};\n"
|
||||
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
|
||||
" cookie-algorithm aes;\n"
|
||||
#else
|
||||
" cookie-algorithm sha256;\n"
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
" coresize default;\n\
|
||||
datasize default;\n"
|
||||
@@ -957,11 +953,9 @@ struct keyalgorithms {
|
||||
unsigned int type;
|
||||
isc_uint16_t size;
|
||||
} algorithms[] = {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
{ "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 },
|
||||
{ "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 },
|
||||
{ "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 },
|
||||
#endif
|
||||
{ "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 },
|
||||
{ "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 },
|
||||
{ "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 },
|
||||
@@ -1008,9 +1002,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
|
||||
|
||||
if (name != NULL) {
|
||||
switch (algorithms[i].hmac) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
|
||||
#endif
|
||||
case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
|
||||
case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
|
||||
case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
|
||||
|
||||
@@ -142,11 +142,7 @@ EXTERN const char * named_g_defaultdnstap INIT(NULL);
|
||||
|
||||
EXTERN const char * named_g_username INIT(NULL);
|
||||
|
||||
#if defined(USE_PKCS11)
|
||||
EXTERN const char * named_g_engine INIT(PKCS11_ENGINE);
|
||||
#else
|
||||
EXTERN const char * named_g_engine INIT(NULL);
|
||||
#endif
|
||||
|
||||
EXTERN isc_time_t named_g_boottime;
|
||||
EXTERN isc_time_t named_g_configtime;
|
||||
|
||||
+4
-26
@@ -44,7 +44,7 @@
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -75,10 +75,8 @@
|
||||
#include <named/smf_globals.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
#ifdef HAVE_LIBXML2
|
||||
#include <libxml/xmlversion.h>
|
||||
#endif
|
||||
@@ -691,7 +689,6 @@ parse_command_line(int argc, char *argv[]) {
|
||||
#ifdef __SUNPRO_C
|
||||
printf("compiled by Solaris Studio %x\n", __SUNPRO_C);
|
||||
#endif
|
||||
#if HAVE_OPENSSL
|
||||
printf("compiled with OpenSSL version: %s\n",
|
||||
OPENSSL_VERSION_TEXT);
|
||||
#if !defined(LIBRESSL_VERSION_NUMBER) && \
|
||||
@@ -703,7 +700,6 @@ parse_command_line(int argc, char *argv[]) {
|
||||
printf("linked to OpenSSL version: %s\n",
|
||||
SSLeay_version(SSLEAY_VERSION));
|
||||
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
|
||||
#endif
|
||||
#ifdef HAVE_LIBXML2
|
||||
printf("compiled with libxml2 version: %s\n",
|
||||
LIBXML_DOTTED_VERSION);
|
||||
@@ -722,11 +718,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
printf("linked to zlib version: %s\n",
|
||||
zlibVersion());
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
printf("threads support is enabled\n");
|
||||
#else
|
||||
printf("threads support is disabled\n");
|
||||
#endif
|
||||
exit(0);
|
||||
case 'x':
|
||||
/* Obsolete. No longer in use. Ignore. */
|
||||
@@ -778,7 +770,6 @@ create_managers(void) {
|
||||
|
||||
INSIST(named_g_cpus_detected > 0);
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
if (named_g_cpus == 0)
|
||||
named_g_cpus = named_g_cpus_detected;
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
@@ -787,9 +778,6 @@ create_managers(void) {
|
||||
named_g_cpus_detected,
|
||||
named_g_cpus_detected == 1 ? "" : "s",
|
||||
named_g_cpus, named_g_cpus == 1 ? "" : "s");
|
||||
#else
|
||||
named_g_cpus = 1;
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
named_g_udpdisp = 1;
|
||||
#else
|
||||
@@ -802,12 +790,10 @@ create_managers(void) {
|
||||
if (named_g_udpdisp > named_g_cpus)
|
||||
named_g_udpdisp = named_g_cpus;
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"using %u UDP listener%s per interface",
|
||||
named_g_udpdisp, named_g_udpdisp == 1 ? "" : "s");
|
||||
#endif
|
||||
|
||||
result = isc_taskmgr_create(named_g_mctx, named_g_cpus, 0,
|
||||
&named_g_taskmgr);
|
||||
@@ -834,7 +820,7 @@ create_managers(void) {
|
||||
isc_result_totext(result));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
isc__socketmgr_maxudp(named_g_socketmgr, maxudp);
|
||||
isc_socketmgr_maxudp(named_g_socketmgr, maxudp);
|
||||
result = isc_socketmgr_getmaxsockets(named_g_socketmgr, &socks);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
@@ -919,12 +905,10 @@ setup(void) {
|
||||
isc_mem_free(named_g_mctx, instance);
|
||||
#endif /* HAVE_LIBSCF */
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
/*
|
||||
* Check for the number of cpu's before named_os_chroot().
|
||||
*/
|
||||
named_g_cpus_detected = isc_os_ncpus();
|
||||
#endif
|
||||
|
||||
named_os_chroot(named_g_chrootdir);
|
||||
|
||||
@@ -1012,7 +996,7 @@ setup(void) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"compiled with OpenSSL version: %s",
|
||||
OPENSSL_VERSION_TEXT);
|
||||
OPENSSL_VERSION_TEXT);
|
||||
#if !defined(LIBRESSL_VERSION_NUMBER) && \
|
||||
OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
@@ -1051,15 +1035,9 @@ setup(void) {
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"linked to zlib version: %s", zlibVersion());
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"threads support is enabled");
|
||||
#else
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
"threads support is disabled");
|
||||
#endif
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
@@ -1358,7 +1336,7 @@ main(int argc, char *argv[]) {
|
||||
dns_result_register();
|
||||
dst_result_register();
|
||||
isccc_result_register();
|
||||
#if HAVE_PKCS11
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
|
||||
|
||||
+45
-43
@@ -6646,25 +6646,32 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
|
||||
dns_rdataset_init(&nameservers);
|
||||
result = dns_view_findzonecut(view, origin, domain, 0, 0, ISC_TRUE,
|
||||
ISC_TRUE, &nameservers, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_resolver_createfetch(view->resolver, tatname,
|
||||
dns_rdatatype_null, domain,
|
||||
&nameservers, NULL, NULL, 0,
|
||||
0, 0, NULL, tat->task,
|
||||
tat_done, tat,
|
||||
&tat->rdataset,
|
||||
&tat->sigrdataset,
|
||||
&tat->fetch);
|
||||
}
|
||||
|
||||
result = dns_resolver_createfetch(view->resolver, tatname,
|
||||
dns_rdatatype_null, domain,
|
||||
&nameservers, NULL, NULL, 0, 0, 0,
|
||||
NULL, tat->task, tat_done, tat,
|
||||
&tat->rdataset, &tat->sigrdataset,
|
||||
&tat->fetch);
|
||||
|
||||
/*
|
||||
* dns_resolver_createfetch() creates its own copies of 'domain' and
|
||||
* 'nameservers'; clean up the latter (the former points into a
|
||||
* dst_key_t structure and thus must not be freed).
|
||||
* 'domain' holds the dns_name_t pointer inside a dst_key_t structure.
|
||||
* dns_resolver_createfetch() creates its own copy of 'domain' if it
|
||||
* succeeds. Thus, 'domain' is not freed here.
|
||||
*
|
||||
* Even if dns_view_findzonecut() returned something else than
|
||||
* ISC_R_SUCCESS, it still could have associated 'nameservers'.
|
||||
* dns_resolver_createfetch() creates its own copy of 'nameservers' if
|
||||
* it succeeds. Thus, we need to check whether 'nameservers' is
|
||||
* associated and release it if it is.
|
||||
*/
|
||||
dns_rdataset_disassociate(&nameservers);
|
||||
if (dns_rdataset_isassociated(&nameservers)) {
|
||||
dns_rdataset_disassociate(&nameservers);
|
||||
}
|
||||
|
||||
done:
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_task_detach(&tat->task);
|
||||
isc_mem_putanddetach(&tat->mctx, tat, sizeof(*tat));
|
||||
@@ -7993,7 +8000,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
"less than 128 UDP sockets available after "
|
||||
"applying 'reserved-sockets' and 'maxsockets'");
|
||||
}
|
||||
isc__socketmgr_setreserved(named_g_socketmgr, reserved);
|
||||
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
|
||||
|
||||
#ifdef HAVE_GEOIP
|
||||
/*
|
||||
@@ -8865,11 +8872,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
result = named_config_get(maps, "cookie-algorithm", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
|
||||
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
|
||||
server->sctx->cookiealg = ns_cookiealg_aes;
|
||||
#else
|
||||
INSIST(0);
|
||||
#endif
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0) {
|
||||
server->sctx->cookiealg = ns_cookiealg_sha1;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha256") == 0) {
|
||||
@@ -11205,7 +11208,6 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
}
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
snprintf(line, sizeof(line), "CPUs found: %u\n", named_g_cpus_detected);
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
@@ -11215,10 +11217,6 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
snprintf(line, sizeof(line), "UDP listeners per interface: %u\n",
|
||||
named_g_udpdisp);
|
||||
CHECK(putstr(text, line));
|
||||
#else
|
||||
snprintf(line, sizeof(line), "CPUs found: N/A (threads disabled)\n");
|
||||
CHECK(putstr(text, line));
|
||||
#endif
|
||||
|
||||
snprintf(line, sizeof(line), "number of zones: %u (%u automatic)\n",
|
||||
zonecount, automatic);
|
||||
@@ -11676,7 +11674,7 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
isc_lex_t *lex, isc_buffer_t **text)
|
||||
{
|
||||
isc_result_t result, tresult;
|
||||
dns_zone_t *zone = NULL, *raw = NULL;
|
||||
dns_zone_t *mayberaw = NULL, *raw = NULL;
|
||||
dns_zonetype_t type;
|
||||
char classstr[DNS_RDATACLASS_FORMATSIZE];
|
||||
char zonename[DNS_NAME_FORMATSIZE];
|
||||
@@ -11685,11 +11683,11 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
isc_boolean_t frozen;
|
||||
const char *msg = NULL;
|
||||
|
||||
result = zone_from_args(server, lex, NULL, &zone, NULL,
|
||||
result = zone_from_args(server, lex, NULL, &mayberaw, NULL,
|
||||
text, ISC_TRUE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
if (zone == NULL) {
|
||||
if (mayberaw == NULL) {
|
||||
result = isc_task_beginexclusive(server->task);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
tresult = ISC_R_SUCCESS;
|
||||
@@ -11709,26 +11707,26 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
isc_result_totext(tresult));
|
||||
return (tresult);
|
||||
}
|
||||
dns_zone_getraw(zone, &raw);
|
||||
dns_zone_getraw(mayberaw, &raw);
|
||||
if (raw != NULL) {
|
||||
dns_zone_detach(&zone);
|
||||
dns_zone_attach(raw, &zone);
|
||||
dns_zone_detach(&mayberaw);
|
||||
dns_zone_attach(raw, &mayberaw);
|
||||
dns_zone_detach(&raw);
|
||||
}
|
||||
type = dns_zone_gettype(zone);
|
||||
type = dns_zone_gettype(mayberaw);
|
||||
if (type != dns_zone_master) {
|
||||
dns_zone_detach(&zone);
|
||||
dns_zone_detach(&mayberaw);
|
||||
return (DNS_R_NOTMASTER);
|
||||
}
|
||||
|
||||
if (freeze && !dns_zone_isdynamic(zone, ISC_TRUE)) {
|
||||
dns_zone_detach(&zone);
|
||||
if (freeze && !dns_zone_isdynamic(mayberaw, ISC_TRUE)) {
|
||||
dns_zone_detach(&mayberaw);
|
||||
return (DNS_R_NOTDYNAMIC);
|
||||
}
|
||||
|
||||
result = isc_task_beginexclusive(server->task);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
frozen = dns_zone_getupdatedisabled(zone);
|
||||
frozen = dns_zone_getupdatedisabled(mayberaw);
|
||||
if (freeze) {
|
||||
if (frozen) {
|
||||
msg = "WARNING: The zone was already frozen.\n"
|
||||
@@ -11737,16 +11735,16 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
result = DNS_R_FROZEN;
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_zone_flush(zone);
|
||||
result = dns_zone_flush(mayberaw);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
msg = "Flushing the zone updates to "
|
||||
"disk failed.";
|
||||
}
|
||||
if (result == ISC_R_SUCCESS)
|
||||
dns_zone_setupdatedisabled(zone, freeze);
|
||||
dns_zone_setupdatedisabled(mayberaw, freeze);
|
||||
} else {
|
||||
if (frozen) {
|
||||
result = dns_zone_loadandthaw(zone);
|
||||
result = dns_zone_loadandthaw(mayberaw);
|
||||
switch (result) {
|
||||
case ISC_R_SUCCESS:
|
||||
case DNS_R_UPTODATE:
|
||||
@@ -11769,7 +11767,7 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
(void) putnull(text);
|
||||
}
|
||||
|
||||
view = dns_zone_getview(zone);
|
||||
view = dns_zone_getview(mayberaw);
|
||||
if (strcmp(view->name, "_default") == 0 ||
|
||||
strcmp(view->name, "_bind") == 0)
|
||||
{
|
||||
@@ -11779,9 +11777,9 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
vname = view->name;
|
||||
sep = " ";
|
||||
}
|
||||
dns_rdataclass_format(dns_zone_getclass(zone), classstr,
|
||||
dns_rdataclass_format(dns_zone_getclass(mayberaw), classstr,
|
||||
sizeof(classstr));
|
||||
dns_name_format(dns_zone_getorigin(zone),
|
||||
dns_name_format(dns_zone_getorigin(mayberaw),
|
||||
zonename, sizeof(zonename));
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
@@ -11789,7 +11787,7 @@ named_server_freeze(named_server_t *server, isc_boolean_t freeze,
|
||||
freeze ? "freezing" : "thawing",
|
||||
zonename, classstr, sep, vname,
|
||||
isc_result_totext(result));
|
||||
dns_zone_detach(&zone);
|
||||
dns_zone_detach(&mayberaw);
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -14928,6 +14926,7 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
||||
dns_stale_answer_t staleanswersok = dns_stale_answer_conf;
|
||||
isc_boolean_t wantstatus = ISC_FALSE;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_boolean_t exclusive = ISC_FALSE;
|
||||
|
||||
/* Skip the command name. */
|
||||
ptr = next_token(lex, text);
|
||||
@@ -14979,6 +14978,7 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
||||
|
||||
result = isc_task_beginexclusive(server->task);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
exclusive = ISC_TRUE;
|
||||
|
||||
for (view = ISC_LIST_HEAD(server->viewlist);
|
||||
view != NULL;
|
||||
@@ -15034,12 +15034,14 @@ named_server_servestale(named_server_t *server, isc_lex_t *lex,
|
||||
}
|
||||
found = ISC_TRUE;
|
||||
}
|
||||
isc_task_endexclusive(named_g_server->task);
|
||||
|
||||
if (!found)
|
||||
result = ISC_R_NOTFOUND;
|
||||
|
||||
cleanup:
|
||||
if (exclusive)
|
||||
isc_task_endexclusive(named_g_server->task);
|
||||
|
||||
if (isc_buffer_usedlength(*text) > 0)
|
||||
(void) putnull(text);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
|
||||
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@@USE_GSSAPI@BUILDER="Visual Studio";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@USE_GSSAPI@BUILDER="Visual Studio";_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@@USE_GSSAPI@BUILDER="Visual Studio";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@USE_GSSAPI@BUILDER="Visual Studio";NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -1309,7 +1309,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
dns_zone_setoption(raw, DNS_ZONEOPT_IXFRFROMDIFFS,
|
||||
ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
|
||||
ISC_TRUE);
|
||||
ISC_FALSE);
|
||||
} else
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
|
||||
ixfrdiff);
|
||||
|
||||
@@ -21,15 +21,15 @@ DST_GSSAPI_INC = @DST_GSSAPI_INC@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${IRS_INCLUDES} ${DST_GSSAPI_INC} \
|
||||
@DST_OPENSSL_INC@
|
||||
@OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
|
||||
+3
-15
@@ -399,7 +399,6 @@ parse_hmac(const dns_name_t **hmac, const char *hmacstr, size_t len,
|
||||
/* Copy len bytes and NUL terminate. */
|
||||
strlcpy(buf, hmacstr, ISC_MIN(len + 1, sizeof(buf)));
|
||||
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
if (strcasecmp(buf, "hmac-md5") == 0) {
|
||||
*hmac = DNS_TSIG_HMACMD5_NAME;
|
||||
} else if (strncasecmp(buf, "hmac-md5-", 9) == 0) {
|
||||
@@ -410,9 +409,7 @@ parse_hmac(const dns_name_t **hmac, const char *hmacstr, size_t len,
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
*digestbitsp = (digestbits + 7) & ~0x7U;
|
||||
} else
|
||||
#endif
|
||||
if (strcasecmp(buf, "hmac-sha1") == 0) {
|
||||
} else if (strcasecmp(buf, "hmac-sha1") == 0) {
|
||||
*hmac = DNS_TSIG_HMACSHA1_NAME;
|
||||
} else if (strncasecmp(buf, "hmac-sha1-", 10) == 0) {
|
||||
*hmac = DNS_TSIG_HMACSHA1_NAME;
|
||||
@@ -515,11 +512,7 @@ setup_keystr(void) {
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
#else
|
||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
||||
#endif
|
||||
name = keystr;
|
||||
n = s;
|
||||
}
|
||||
@@ -653,11 +646,9 @@ setup_keyfile(isc_mem_t *mctx, isc_log_t *lctx) {
|
||||
}
|
||||
|
||||
switch (dst_key_alg(dstkey)) {
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
case DST_ALG_HMACMD5:
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
break;
|
||||
#endif
|
||||
case DST_ALG_HMACSHA1:
|
||||
hmacname = DNS_TSIG_HMACSHA1_NAME;
|
||||
break;
|
||||
@@ -1581,12 +1572,9 @@ evaluate_key(char *cmdline) {
|
||||
return (STATUS_SYNTAX);
|
||||
}
|
||||
namestr = n + 1;
|
||||
} else
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
} else {
|
||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||
#else
|
||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
||||
#endif
|
||||
}
|
||||
|
||||
isc_buffer_init(&b, namestr, strlen(namestr));
|
||||
isc_buffer_add(&b, strlen(namestr));
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@@USE_GSSAPI@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@USE_GSSAPI@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||
@@ -79,7 +79,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;@CRYPTO@@USE_GSSAPI@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;@USE_GSSAPI@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<StringPooling>true</StringPooling>
|
||||
|
||||
@@ -17,7 +17,7 @@ CINCLUDES = ${ISC_INCLUDES}
|
||||
|
||||
CDEFINES =
|
||||
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
BIND-9 PKCS#11 support
|
||||
|
||||
Prerequisite
|
||||
|
||||
The PKCS#11 support needs a PKCS#11 OpenSSL engine based on the Solaris one,
|
||||
released the 2008-12-02 for OpenSSL 0.9.8i, with back port of key by reference
|
||||
and some improvements, including user friendly PIN management. You may also
|
||||
use the original engine code.
|
||||
|
||||
Compilation
|
||||
|
||||
"configure --with-pkcs11 ..."
|
||||
|
||||
PKCS#11 Libraries
|
||||
|
||||
Tested with Solaris one with a SCA board and with openCryptoki with the
|
||||
software token. Known to work on Linux and Windows 2003 server so
|
||||
should work on most operating systems. For AEP Keyper or any device used
|
||||
only for its protected key store, please switch to the sign-only engine.
|
||||
|
||||
OpenSSL Engines
|
||||
|
||||
With PKCS#11 support the PKCS#11 engine is statically loaded but at its
|
||||
initialization it dynamically loads the PKCS#11 objects.
|
||||
Even the pre commands are therefore unused they are defined with:
|
||||
SO_PATH:
|
||||
define: PKCS11_SO_PATH
|
||||
default: /usr/local/lib/engines/engine_pkcs11.so
|
||||
MODULE_PATH:
|
||||
define: PKCS11_MODULE_PATH
|
||||
default: /usr/lib/libpkcs11.so
|
||||
Without PKCS#11 support, a specific OpenSSL engine can be still used
|
||||
by defining ENGINE_ID at compile time.
|
||||
|
||||
PKCS#11 tools
|
||||
|
||||
The contrib/pkcs11-keygen directory contains a set of experimental tools
|
||||
to handle keys stored in a Hardware Security Module at the benefit of BIND.
|
||||
|
||||
The patch for OpenSSL 0.9.8i is in this directory. Read its README.pkcs11
|
||||
for the way to use it (these are the original notes so with the original
|
||||
path, etc. Define HAVE_GETPASSPHRASE if you have getpassphrase() on
|
||||
a operating system which is not Solaris.)
|
||||
|
||||
Not all tools are supported on AEP Keyper but genkey and dnssec-keyfromlabel
|
||||
are functional.
|
||||
|
||||
PIN management
|
||||
|
||||
With the just fixed PKCS#11 OpenSSL engine, the PIN should be entered
|
||||
each time it is required. With the improved engine, the PIN should be
|
||||
entered the first time it is required or can be configured in the
|
||||
OpenSSL configuration file (aka. openssl.cnf) by adding in it:
|
||||
- at the beginning:
|
||||
openssl_conf = openssl_def
|
||||
- at any place these sections:
|
||||
[ openssl_def ]
|
||||
engines = engine_section
|
||||
[ engine_section ]
|
||||
pkcs11 = pkcs11_section
|
||||
[ pkcs11_section ]
|
||||
PIN = put__your__pin__value__here
|
||||
|
||||
Slot management
|
||||
|
||||
The engine tries to use the first best slot but it is recommended
|
||||
to simply use the slot 0 (usual default, meta-slot on Solaris).
|
||||
|
||||
Sign-only engine
|
||||
|
||||
openssl.../crypto/engine/hw_pk11-kp.c and hw_pk11_pub-kp.c contain
|
||||
a stripped down version of hw_pk11.c and hw_pk11_pub.c files which
|
||||
has only the useful functions (i.e., signature with a RSA private
|
||||
key in the device protected key store and key loading).
|
||||
|
||||
This engine should be used with a device which provides mainly
|
||||
a protected store and no acceleration. AEP Keyper is an example
|
||||
of such a device (BTW with the fully capable engine, key export
|
||||
must be enabled on this device and this configuration is not yet
|
||||
supported).
|
||||
|
||||
Original engine
|
||||
|
||||
If you are using the original engine and getpassphrase() is not defined, add:
|
||||
#define getpassphrase(x) getpass(x)
|
||||
in openssl.../crypto/engine/hw_pk11_pub.c
|
||||
|
||||
Notes
|
||||
|
||||
Some names here are registered trademarks, at least Solaris is a trademark
|
||||
of Sun Microsystems Inc...
|
||||
Include files are from RSA Labs., PKCS#11 version is 2.20 amendment 3.
|
||||
The PKCS#11 support is compatible with the forthcoming FIPS 140-2 support.
|
||||
@@ -67,10 +67,6 @@
|
||||
#define sleep(x) Sleep(x)
|
||||
#endif
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
@@ -149,8 +145,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, OP_ANY, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -67,18 +67,14 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
#define WANT_DH_PRIMES
|
||||
#define WANT_ECC_CURVES
|
||||
#include <pk11/constants.h>
|
||||
#include <pkcs11/eddsa.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
/* Define static key template values */
|
||||
static CK_BBOOL truevalue = TRUE;
|
||||
static CK_BBOOL falsevalue = FALSE;
|
||||
@@ -403,7 +399,7 @@ main(int argc, char *argv[]) {
|
||||
public_template[RSA_PUBLIC_EXPONENT].ulValueLen = expsize;
|
||||
break;
|
||||
case key_ecc:
|
||||
op_type = OP_EC;
|
||||
op_type = OP_ECDSA;
|
||||
if (bits == 0)
|
||||
bits = 256;
|
||||
else if (bits != 256 && bits != 384) {
|
||||
@@ -435,8 +431,8 @@ main(int argc, char *argv[]) {
|
||||
#ifndef CKM_EDDSA_KEY_PAIR_GEN
|
||||
fprintf(stderr, "CKM_EDDSA_KEY_PAIR_GEN is not defined\n");
|
||||
usage();
|
||||
#endif
|
||||
op_type = OP_EC;
|
||||
#else
|
||||
op_type = OP_EDDSA;
|
||||
if (bits == 0)
|
||||
bits = 256;
|
||||
else if (bits != 256 && bits != 456) {
|
||||
@@ -463,6 +459,7 @@ main(int argc, char *argv[]) {
|
||||
sizeof(pk11_ecc_ed448);
|
||||
}
|
||||
|
||||
#endif
|
||||
break;
|
||||
case key_dsa:
|
||||
op_type = OP_DSA;
|
||||
@@ -562,8 +559,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
@@ -143,8 +139,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (logon && pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (logon && pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, OP_ANY, ISC_FALSE, ISC_FALSE,
|
||||
logon, pin, slot);
|
||||
|
||||
@@ -23,8 +23,8 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
|
||||
+8
-10
@@ -668,23 +668,21 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
|
||||
secretstr = cfg_obj_asstring(secretobj);
|
||||
algorithmstr = cfg_obj_asstring(algorithmobj);
|
||||
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
if (strcasecmp(algorithmstr, "hmac-md5") == 0)
|
||||
if (strcasecmp(algorithmstr, "hmac-md5") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACMD5;
|
||||
else
|
||||
#endif
|
||||
if (strcasecmp(algorithmstr, "hmac-sha1") == 0)
|
||||
} else if (strcasecmp(algorithmstr, "hmac-sha1") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACSHA1;
|
||||
else if (strcasecmp(algorithmstr, "hmac-sha224") == 0)
|
||||
} else if (strcasecmp(algorithmstr, "hmac-sha224") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACSHA224;
|
||||
else if (strcasecmp(algorithmstr, "hmac-sha256") == 0)
|
||||
} else if (strcasecmp(algorithmstr, "hmac-sha256") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACSHA256;
|
||||
else if (strcasecmp(algorithmstr, "hmac-sha384") == 0)
|
||||
} else if (strcasecmp(algorithmstr, "hmac-sha384") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACSHA384;
|
||||
else if (strcasecmp(algorithmstr, "hmac-sha512") == 0)
|
||||
} else if (strcasecmp(algorithmstr, "hmac-sha512") == 0) {
|
||||
algorithm = ISCCC_ALG_HMACSHA512;
|
||||
else
|
||||
} else {
|
||||
fatal("unsupported algorithm: %s", algorithmstr);
|
||||
}
|
||||
|
||||
secret.rstart = (unsigned char *)secretarray;
|
||||
secret.rend = (unsigned char *)secretarray + sizeof(secretarray);
|
||||
|
||||
@@ -14,15 +14,15 @@ top_srcdir = @top_srcdir@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
@DST_OPENSSL_INC@
|
||||
@OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
|
||||
@@ -14,7 +14,7 @@ top_srcdir = @top_srcdir@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
@DST_OPENSSL_INC@ @DST_GSSAPI_INC@
|
||||
@OPENSSL_INCLUDES@ @DST_GSSAPI_INC@
|
||||
|
||||
CDEFINES = @USE_GSSAPI@
|
||||
|
||||
@@ -22,8 +22,8 @@ CWARNINGS =
|
||||
BACKTRACECFLAGS = @BACKTRACECFLAGS@
|
||||
|
||||
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
|
||||
|
||||
@@ -44,10 +44,8 @@ int
|
||||
main(int argc, char **argv) {
|
||||
isc_sha1_t sha1;
|
||||
isc_sha224_t sha224;
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
isc_md5_t md5;
|
||||
isc_hmacmd5_t hmacmd5;
|
||||
#endif
|
||||
isc_hmacsha1_t hmacsha1;
|
||||
isc_hmacsha224_t hmacsha224;
|
||||
isc_hmacsha256_t hmacsha256;
|
||||
@@ -89,7 +87,6 @@ main(int argc, char **argv) {
|
||||
isc_sha224_final(digest, &sha224);
|
||||
print_digest(s, "sha224", digest, ISC_SHA224_DIGESTLENGTH/4);
|
||||
|
||||
#ifndef PK11_MD5_DISABLE
|
||||
s = "abc";
|
||||
isc_md5_init(&md5);
|
||||
memmove(buffer, s, strlen(s));
|
||||
@@ -127,7 +124,6 @@ main(int argc, char **argv) {
|
||||
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
|
||||
isc_hmacmd5_sign(&hmacmd5, digest);
|
||||
print_digest(s, "hmacmd5", digest, 4);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The 3 HMAC-SHA1 examples from RFC4634.
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#define sleep(x) Sleep(1000 * x)
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
|
||||
isc_rwlock_t lock;
|
||||
|
||||
static isc_threadresult_t
|
||||
@@ -130,15 +128,3 @@ main(int argc, char *argv[]) {
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
fprintf(stderr, "This test requires threads.\n");
|
||||
return(1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,31 +13,17 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
PROVIDER = @PKCS11_PROVIDER@
|
||||
|
||||
CINCLUDES = ${ISC_INCLUDES}
|
||||
CDEFINES =
|
||||
|
||||
CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\"
|
||||
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
|
||||
LIBS = ${ISCLIBS} @LIBS@
|
||||
|
||||
SUBDIRS = benchmarks
|
||||
|
||||
TARGETS = pkcs11-md5sum@EXEEXT@ pkcs11-hmacmd5@EXEEXT@
|
||||
SRCS = pkcs11-md5sum.c pkcs11-hmacmd5.c
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
pkcs11-md5sum@EXEEXT@: @srcdir@/pkcs11-md5sum.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/pkcs11-md5sum.c ${LIBS}
|
||||
|
||||
pkcs11-hmacmd5@EXEEXT@: @srcdir@/pkcs11-hmacmd5.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/pkcs11-hmacmd5.c ${LIBS}
|
||||
|
||||
test:
|
||||
|
||||
clean distclean::
|
||||
|
||||
@@ -13,24 +13,21 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
PROVIDER = @PKCS11_PROVIDER@
|
||||
|
||||
CINCLUDES = ${ISC_INCLUDES}
|
||||
CDEFINES =
|
||||
|
||||
CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\"
|
||||
|
||||
ISCLIBS = ../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
|
||||
LIBS = ${ISCLIBS} @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
TARGETS = session@EXEEXT@ login@EXEEXT@ random@EXEEXT@ \
|
||||
sha1@EXEEXT@ create@EXEEXT@ find@EXEEXT@ \
|
||||
TARGETS = session@EXEEXT@ login@EXEEXT@ \
|
||||
create@EXEEXT@ find@EXEEXT@ \
|
||||
pubrsa@EXEEXT@ privrsa@EXEEXT@ genrsa@EXEEXT@ \
|
||||
sign@EXEEXT@ verify@EXEEXT@
|
||||
|
||||
SRCS = session.c login.c random.c sha1.c create.c find.c \
|
||||
SRCS = session.c login.c create.c find.c \
|
||||
pubrsa.c privrsa.c genrsa.c sign.c verify.c
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
@@ -43,14 +40,6 @@ login@EXEEXT@: @srcdir@/login.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/login.c ${LIBS}
|
||||
|
||||
random@EXEEXT@: @srcdir@/random.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/random.c ${LIBS}
|
||||
|
||||
sha1@EXEEXT@: @srcdir@/sha1.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/sha1.c ${LIBS}
|
||||
|
||||
create@EXEEXT@: @srcdir@/create.c
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \
|
||||
-o $@ @srcdir@/create.c ${LIBS}
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -175,7 +171,7 @@ main(int argc, char *argv[]) {
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
pin = getpass("Enter Pin: ");
|
||||
|
||||
result = pk11_get_session(&pctx, OP_ANY, ISC_TRUE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -54,10 +54,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -152,8 +148,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -201,8 +197,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/internal.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -149,8 +145,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = (CK_UTF8CHAR *)getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = (CK_UTF8CHAR *)getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
rv = pkcs_C_Initialize(NULL_PTR);
|
||||
if (rv != CKR_OK) {
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -279,8 +275,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -200,8 +196,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions copyright (c) 2008 Nominet UK. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
/* random [-m module] [-s $slot] [-n count] */
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 0
|
||||
#endif
|
||||
|
||||
static int clock_gettime(int32_t id, struct timespec *tp);
|
||||
|
||||
static int
|
||||
clock_gettime(int32_t id, struct timespec *tp)
|
||||
{
|
||||
struct timeval tv;
|
||||
int result;
|
||||
|
||||
UNUSED(id);
|
||||
|
||||
result = gettimeofday(&tv, NULL);
|
||||
if (result)
|
||||
return (result);
|
||||
tp->tv_sec = tv.tv_sec;
|
||||
tp->tv_nsec = (long) tv.tv_usec * 1000;
|
||||
return (result);
|
||||
}
|
||||
#endif
|
||||
|
||||
CK_BYTE buf[1024];
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
CK_RV rv;
|
||||
CK_SLOT_ID slot = 0;
|
||||
CK_SESSION_HANDLE hSession = CK_INVALID_HANDLE;
|
||||
CK_ULONG len = sizeof(buf);
|
||||
pk11_context_t pctx;
|
||||
pk11_optype_t op_type = OP_RAND;
|
||||
char *lib_name = NULL;
|
||||
int error = 0;
|
||||
int c, errflg = 0;
|
||||
unsigned int count = 1000;
|
||||
unsigned int i;
|
||||
struct timespec starttime;
|
||||
struct timespec endtime;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, ":m:s:n:")) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
lib_name = isc_commandline_argument;
|
||||
break;
|
||||
case 's':
|
||||
slot = atoi(isc_commandline_argument);
|
||||
op_type = OP_ANY;
|
||||
break;
|
||||
case 'n':
|
||||
count = atoi(isc_commandline_argument);
|
||||
break;
|
||||
case ':':
|
||||
fprintf(stderr,
|
||||
"Option -%c requires an operand\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
fprintf(stderr, "Unrecognised option: -%c\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
}
|
||||
}
|
||||
|
||||
if (errflg) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
"\trandom [-m module] [-s slot] [-n count]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pk11_result_register();
|
||||
|
||||
/* Initialize the CRYPTOKI library */
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE,
|
||||
ISC_FALSE, NULL, slot);
|
||||
if ((result != ISC_R_SUCCESS) &&
|
||||
(result != PK11_R_NODIGESTSERVICE) &&
|
||||
(result != PK11_R_NOAESSERVICE)) {
|
||||
fprintf(stderr, "Error initializing PKCS#11: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
hSession = pctx.session;
|
||||
|
||||
if (clock_gettime(CLOCK_REALTIME, &starttime) < 0) {
|
||||
perror("clock_gettime(start)");
|
||||
goto exit_session;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
/* Get random bytes */
|
||||
rv = pkcs_C_GenerateRandom(hSession, buf, len);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_GenerateRandom[%u]: Error = 0x%.8lX\n",
|
||||
i, rv);
|
||||
error = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (clock_gettime(CLOCK_REALTIME, &endtime) < 0) {
|
||||
perror("clock_gettime(end)");
|
||||
goto exit_session;
|
||||
}
|
||||
|
||||
endtime.tv_sec -= starttime.tv_sec;
|
||||
endtime.tv_nsec -= starttime.tv_nsec;
|
||||
while (endtime.tv_nsec < 0) {
|
||||
endtime.tv_sec -= 1;
|
||||
endtime.tv_nsec += 1000000000;
|
||||
}
|
||||
printf("%uK random bytes in %ld.%09lds\n", i,
|
||||
endtime.tv_sec, endtime.tv_nsec);
|
||||
if (i > 0)
|
||||
printf("%g random bytes/s\n",
|
||||
1024 * i / ((double) endtime.tv_sec +
|
||||
(double) endtime.tv_nsec / 1000000000.));
|
||||
|
||||
exit_session:
|
||||
pk11_return_session(&pctx);
|
||||
(void) pk11_finalize();
|
||||
|
||||
exit(error);
|
||||
}
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -272,8 +268,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
#include <sys/time.h>
|
||||
@@ -193,8 +189,9 @@ main(int argc, char *argv[]) {
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
if (pin == NULL) {
|
||||
pin = getpass("Enter Pin: ");
|
||||
}
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_TRUE,
|
||||
ISC_TRUE, (const char *) pin, slot);
|
||||
|
||||
@@ -1,327 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions copyright (c) 2008 Nominet UK. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* pkcs11-hmacmd5
|
||||
*
|
||||
* Prints the MD5 HMAC of the standard input, using the PKCS#11 device.
|
||||
*
|
||||
* Usage:
|
||||
* pkcs11-hmacmd5 [-m module] [-s $slot] [-n] [-p $pin]
|
||||
* -m: PKCS#11 provider module. This must be the full
|
||||
* path to a shared library object implementing the
|
||||
* PKCS#11 API for a device.
|
||||
* -s: Slot
|
||||
* -p: PIN
|
||||
* -n: don't log in to the PKCS#11 device
|
||||
* -k: key name for the HMAC
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
/* Define static key template values */
|
||||
static CK_BBOOL truevalue = TRUE;
|
||||
static CK_BBOOL falsevalue = FALSE;
|
||||
|
||||
#define BLOCKSIZE 32768
|
||||
|
||||
char buffer[BLOCKSIZE + 72];
|
||||
char digest[16];
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
CK_RV rv;
|
||||
CK_SLOT_ID slot = 0;
|
||||
CK_SESSION_HANDLE hSession;
|
||||
CK_MECHANISM mech = { CKM_MD5_HMAC, NULL, 0 };
|
||||
CK_ULONG len;
|
||||
CK_OBJECT_HANDLE hKey = CK_INVALID_HANDLE;
|
||||
CK_OBJECT_CLASS keyClass = CKO_SECRET_KEY;
|
||||
CK_KEY_TYPE keyType = CKK_MD5_HMAC;
|
||||
CK_ATTRIBUTE keyTemplate[] =
|
||||
{
|
||||
{ CKA_CLASS, &keyClass, (CK_ULONG) sizeof(keyClass) },
|
||||
{ CKA_KEY_TYPE, &keyType, (CK_ULONG) sizeof(keyType) },
|
||||
{ CKA_TOKEN, &falsevalue, (CK_ULONG) sizeof(falsevalue) },
|
||||
{ CKA_PRIVATE, &falsevalue, (CK_ULONG) sizeof(falsevalue) },
|
||||
{ CKA_SIGN, &truevalue, (CK_ULONG) sizeof(truevalue) },
|
||||
{ CKA_VALUE, NULL, 0 }
|
||||
};
|
||||
pk11_context_t pctx;
|
||||
pk11_optype_t op_type = OP_DIGEST;
|
||||
char *lib_name = NULL;
|
||||
char *pin = NULL;
|
||||
int error = 0;
|
||||
isc_boolean_t logon = ISC_TRUE;
|
||||
int c, errflg = 0;
|
||||
char *key = NULL;
|
||||
size_t sum = 0;
|
||||
unsigned int i;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, ":m:s:np:k:")) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
lib_name = isc_commandline_argument;
|
||||
break;
|
||||
case 's':
|
||||
slot = atoi(isc_commandline_argument);
|
||||
op_type = OP_ANY;
|
||||
break;
|
||||
case 'n':
|
||||
logon = ISC_FALSE;
|
||||
break;
|
||||
case 'p':
|
||||
pin = isc_commandline_argument;
|
||||
break;
|
||||
case 'k':
|
||||
key = isc_commandline_argument;
|
||||
break;
|
||||
case ':':
|
||||
fprintf(stderr,
|
||||
"Option -%c requires an operand\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
fprintf(stderr, "Unrecognised option: -%c\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
}
|
||||
}
|
||||
|
||||
if (errflg || (key == NULL)) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
"\tpkcs11-hmacmd5 [-m module] [-s slot] "
|
||||
"[-n|-p pin] -k key\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Decode the key */
|
||||
for (i = 0; i < BLOCKSIZE / 2; i++) {
|
||||
switch (c = *key++) {
|
||||
case 0:
|
||||
goto key_done;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if ((i & 1) == 0)
|
||||
buffer[i >> 1] = (c - '0') << 4;
|
||||
else
|
||||
buffer[i >> 1] |= c - '0';
|
||||
break;
|
||||
case 'A':
|
||||
case 'B':
|
||||
case 'C':
|
||||
case 'D':
|
||||
case 'E':
|
||||
case 'F':
|
||||
if ((i & 1) == 0)
|
||||
buffer[i >> 1] = (c - 'A' + 10) << 4;
|
||||
else
|
||||
buffer[i >> 1] |= c - 'A' + 10;
|
||||
break;
|
||||
case 'a':
|
||||
case 'b':
|
||||
case 'c':
|
||||
case 'd':
|
||||
case 'e':
|
||||
case 'f':
|
||||
if ((i & 1) == 0)
|
||||
buffer[i >> 1] = (c - 'a' + 10) << 4;
|
||||
else
|
||||
buffer[i >> 1] |= c - 'a' + 10;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Not hexdigit '%c' in key\n", c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
key_done:
|
||||
if ((i & 1) != 0) {
|
||||
fprintf(stderr, "Even number of hexdigits in key\n");
|
||||
exit(1);
|
||||
}
|
||||
len = i >> 1;
|
||||
keyTemplate[5].pValue = buffer;
|
||||
keyTemplate[5].ulValueLen = (CK_ULONG) len;
|
||||
|
||||
pk11_result_register();
|
||||
|
||||
/* Initialize the CRYPTOKI library */
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (logon && pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE, logon,
|
||||
(const char *) pin, slot);
|
||||
if ((result != ISC_R_SUCCESS) &&
|
||||
(result != PK11_R_NORANDOMSERVICE) &&
|
||||
(result != PK11_R_NOAESSERVICE)) {
|
||||
fprintf(stderr, "Error initializing PKCS#11: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pin != NULL)
|
||||
memset(pin, 0, strlen((char *)pin));
|
||||
|
||||
hSession = pctx.session;
|
||||
|
||||
rv = pkcs_C_CreateObject(hSession, keyTemplate, (CK_ULONG) 6, &hKey);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_CreateObject: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
if (hKey == CK_INVALID_HANDLE) {
|
||||
fprintf(stderr, "C_CreateObject failed\n");
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
|
||||
rv = pkcs_C_SignInit(hSession, &mech, hKey);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_SignInit: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_sign;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
size_t n;
|
||||
|
||||
for (;;) {
|
||||
n = fread(buffer + sum, 1, BLOCKSIZE - sum, stdin);
|
||||
sum += n;
|
||||
if (sum == BLOCKSIZE)
|
||||
break;
|
||||
if (n == 0) {
|
||||
if (ferror(stdin)) {
|
||||
fprintf(stderr, "fread failed\n");
|
||||
error = 1;
|
||||
goto exit_sign;
|
||||
}
|
||||
goto partial_block;
|
||||
}
|
||||
if (feof(stdin))
|
||||
goto partial_block;
|
||||
}
|
||||
|
||||
rv = pkcs_C_SignUpdate(hSession, (CK_BYTE_PTR) buffer,
|
||||
(CK_ULONG) BLOCKSIZE);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_SignUpdate: Error = 0x%.8lX\n",
|
||||
rv);
|
||||
error = 1;
|
||||
goto exit_sign;
|
||||
}
|
||||
}
|
||||
|
||||
partial_block:
|
||||
if (sum > 0) {
|
||||
rv = pkcs_C_SignUpdate(hSession, (CK_BYTE_PTR) buffer,
|
||||
(CK_ULONG) sum);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_SignUpdate: Error = 0x%.8lX\n",
|
||||
rv);
|
||||
error = 1;
|
||||
goto exit_sign;
|
||||
}
|
||||
}
|
||||
|
||||
len = 16;
|
||||
rv = pkcs_C_SignFinal(hSession, (CK_BYTE_PTR) digest, &len);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_SignFinal: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_sign;
|
||||
}
|
||||
if (len != 16) {
|
||||
fprintf(stderr, "C_SignFinal: bad length = %lu\n", len);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
printf("%02x", digest[i] & 0xff);
|
||||
printf("\n");
|
||||
|
||||
exit_sign:
|
||||
rv = pkcs_C_DestroyObject(hSession, hKey);
|
||||
if ((error == 0) && (rv != CKR_OK)) {
|
||||
fprintf(stderr, "C_DestroyObject: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
exit_session:
|
||||
pk11_return_session(&pctx);
|
||||
(void) pk11_finalize();
|
||||
|
||||
exit(error);
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions copyright (c) 2008 Nominet UK. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* pkcs11-md5sum
|
||||
*
|
||||
* Prints the MD5 checksum of the standard input, using the PKCS#11 device.
|
||||
*
|
||||
* Usage:
|
||||
* pkcs11-md5sum [-m module] [-s $slot] [-n] [-p $pin]
|
||||
* -m: PKCS#11 provider module. This must be the full
|
||||
* path to a shared library object implementing the
|
||||
* PKCS#11 API for a device.
|
||||
* -s: Slot
|
||||
* -p: PIN
|
||||
* -n: don't log in to the PKCS#11 device
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <pk11/pk11.h>
|
||||
#include <pk11/result.h>
|
||||
|
||||
#if !(defined(HAVE_GETPASSPHRASE) || (defined (__SVR4) && defined (__sun)))
|
||||
#define getpassphrase(x) getpass(x)
|
||||
#endif
|
||||
|
||||
#define BLOCKSIZE 32768
|
||||
|
||||
char buffer[BLOCKSIZE + 72];
|
||||
char digest[16];
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
CK_RV rv;
|
||||
CK_SLOT_ID slot = 0;
|
||||
CK_SESSION_HANDLE hSession;
|
||||
CK_MECHANISM mech = { CKM_MD5, NULL, 0 };
|
||||
CK_ULONG len;
|
||||
pk11_context_t pctx;
|
||||
pk11_optype_t op_type = OP_DIGEST;
|
||||
char *lib_name = NULL;
|
||||
char *pin = NULL;
|
||||
int error = 0;
|
||||
isc_boolean_t logon = ISC_TRUE;
|
||||
int c, errflg = 0;
|
||||
size_t sum = 0;
|
||||
unsigned int i;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, ":m:s:np:")) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
lib_name = isc_commandline_argument;
|
||||
break;
|
||||
case 's':
|
||||
slot = atoi(isc_commandline_argument);
|
||||
op_type = OP_ANY;
|
||||
break;
|
||||
case 'n':
|
||||
logon = ISC_FALSE;
|
||||
break;
|
||||
case 'p':
|
||||
pin = isc_commandline_argument;
|
||||
break;
|
||||
case ':':
|
||||
fprintf(stderr,
|
||||
"Option -%c requires an operand\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
fprintf(stderr, "Unrecognised option: -%c\n",
|
||||
isc_commandline_option);
|
||||
errflg++;
|
||||
}
|
||||
}
|
||||
|
||||
if (errflg) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
"\tpkcs11-md5sum [-m module] [-s slot] [-n|-p pin]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pk11_result_register();
|
||||
|
||||
/* Initialize the CRYPTOKI library */
|
||||
if (lib_name != NULL)
|
||||
pk11_set_lib_name(lib_name);
|
||||
|
||||
if (logon && pin == NULL)
|
||||
pin = getpassphrase("Enter Pin: ");
|
||||
|
||||
result = pk11_get_session(&pctx, op_type, ISC_FALSE, ISC_FALSE, logon,
|
||||
(const char *) pin, slot);
|
||||
if ((result != ISC_R_SUCCESS) &&
|
||||
(result != PK11_R_NORANDOMSERVICE) &&
|
||||
(result != PK11_R_NOAESSERVICE)) {
|
||||
fprintf(stderr, "Error initializing PKCS#11: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (pin != NULL)
|
||||
memset(pin, 0, strlen((char *)pin));
|
||||
|
||||
hSession = pctx.session;
|
||||
|
||||
rv = pkcs_C_DigestInit(hSession, &mech);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_DigestInit: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
size_t n;
|
||||
|
||||
for (;;) {
|
||||
n = fread(buffer + sum, 1, BLOCKSIZE - sum, stdin);
|
||||
sum += n;
|
||||
if (sum == BLOCKSIZE)
|
||||
break;
|
||||
if (n == 0) {
|
||||
if (ferror(stdin)) {
|
||||
fprintf(stderr, "fread failed\n");
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
goto partial_block;
|
||||
}
|
||||
if (feof(stdin))
|
||||
goto partial_block;
|
||||
}
|
||||
|
||||
rv = pkcs_C_DigestUpdate(hSession, (CK_BYTE_PTR) buffer,
|
||||
(CK_ULONG) BLOCKSIZE);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_DigestUpdate: Error = 0x%.8lX\n",
|
||||
rv);
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
}
|
||||
|
||||
partial_block:
|
||||
if (sum > 0) {
|
||||
rv = pkcs_C_DigestUpdate(hSession, (CK_BYTE_PTR) buffer,
|
||||
(CK_ULONG) sum);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr,
|
||||
"C_DigestUpdate: Error = 0x%.8lX\n",
|
||||
rv);
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
}
|
||||
|
||||
len = 16;
|
||||
rv = pkcs_C_DigestFinal(hSession, (CK_BYTE_PTR) digest, &len);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_DigestFinal: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
goto exit_session;
|
||||
}
|
||||
if (len != 16) {
|
||||
fprintf(stderr, "C_DigestFinal: bad length = %lu\n", len);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
printf("%02x", digest[i] & 0xff);
|
||||
printf("\n");
|
||||
|
||||
exit_session:
|
||||
pk11_return_session(&pctx);
|
||||
(void) pk11_finalize();
|
||||
|
||||
exit(error);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ CDEFINES = @USE_GSSAPI@
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS =
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
|
||||
DNSDEPLIBS =
|
||||
ISCDEPLIBS =
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -81,6 +81,21 @@ in_cache () {
|
||||
return 0
|
||||
}
|
||||
|
||||
# Extract records at and below name "$1" from the cache dump in file "$2".
|
||||
filter_tree () {
|
||||
tree="$1"
|
||||
file="$2"
|
||||
perl -n -e '
|
||||
next if /^;/;
|
||||
if (/'"$tree"'/ || (/^\t/ && $print)) {
|
||||
$print = 1;
|
||||
} else {
|
||||
$print = 0;
|
||||
}
|
||||
print if $print;
|
||||
' "$file"
|
||||
}
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check correctness of routine cache cleaning ($n)"
|
||||
$DIG $DIGOPTS +tcp +keepopen -b 10.53.0.7 -f dig.batch > dig.out.ns2 || status=1
|
||||
@@ -98,8 +113,8 @@ echo_i "reset and check that records are correctly cached initially ($n)"
|
||||
ret=0
|
||||
load_cache
|
||||
dump_cache
|
||||
nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)'| wc -l`
|
||||
[ $nrecords -eq 17 ] || { ret=1; echo_i "found $nrecords records expected 17"; }
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 18 ] || { ret=1; echo_i "found $nrecords records expected 18"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -108,7 +123,7 @@ echo_i "check flushing of the full cache ($n)"
|
||||
ret=0
|
||||
clear_cache
|
||||
dump_cache
|
||||
nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | wc -l`
|
||||
[ $nrecords -eq 0 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -192,7 +207,7 @@ n=`expr $n + 1`
|
||||
echo_i "check the number of cached records remaining ($n)"
|
||||
ret=0
|
||||
dump_cache
|
||||
nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 17 ] || { ret=1; echo_i "found $nrecords records expected 17"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
@@ -210,7 +225,7 @@ n=`expr $n + 1`
|
||||
echo_i "check the number of cached records remaining ($n)"
|
||||
ret=0
|
||||
dump_cache
|
||||
nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)' | wc -l`
|
||||
nrecords=`filter_tree flushtest.example ns2/named_dump.db.$n | egrep '(TXT|ANY)' | wc -l`
|
||||
[ $nrecords -eq 1 ] || { ret=1; echo_i "found $nrecords records expected 1"; }
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -12,8 +12,6 @@
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
$SHELL ../testcrypto.sh || exit 255
|
||||
|
||||
if test -n "$PYTHON"
|
||||
then
|
||||
if $PYTHON -c "import dns" 2> /dev/null
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -12,8 +12,7 @@ SYSTEMTESTTOP=..
|
||||
|
||||
status=0
|
||||
n=0
|
||||
# using dig insecure mode as not testing dnssec here
|
||||
DIGOPTS="-i -p ${PORT}"
|
||||
DIGOPTS="-p ${PORT}"
|
||||
SENDCMD="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 ${EXTRAPORT1}"
|
||||
|
||||
if [ -x ${DIG} ] ; then
|
||||
@@ -443,23 +442,6 @@ if [ -x ${DIG} ] ; then
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
if $FEATURETEST --with-idn
|
||||
then
|
||||
echo_i "checking dig +idnout ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS @10.53.0.3 +noidnout xn--caf-dma.example. > dig.out.1.test$n 2>&1 || ret=1
|
||||
$DIG $DIGOPTS @10.53.0.3 +idnout xn--caf-dma.example. > dig.out.2.test$n 2>&1 || ret=1
|
||||
grep "^xn--caf-dma.example" dig.out.1.test$n > /dev/null || ret=1
|
||||
grep "^xn--caf-dma.example" dig.out.2.test$n > /dev/null && ret=1
|
||||
grep 10.1.2.3 dig.out.1.test$n > /dev/null || ret=1
|
||||
grep 10.1.2.3 dig.out.2.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
else
|
||||
echo_i "skipping 'dig +idnout' as IDN support is not enabled ($n)"
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that dig warns about .local queries ($n)"
|
||||
ret=0
|
||||
@@ -517,6 +499,19 @@ else
|
||||
echo_i "$DIG is needed, so skipping these dig tests"
|
||||
fi
|
||||
|
||||
MDIGOPTS="-p ${PORT}"
|
||||
if [ -x ${MDIG} ] ; then
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that mdig handles malformed option '+ednsopt=:' gracefully ($n)"
|
||||
ret=0
|
||||
$MDIG $MDIGOPTS @10.53.0.3 +ednsopt=: a.example > dig.out.test$n 2>&1 && ret=1
|
||||
grep "ednsopt no code point specified" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
else
|
||||
echo_i "$MDIG is needed, so skipping these mdig tests"
|
||||
fi
|
||||
|
||||
# using delv insecure mode as not testing dnssec here
|
||||
DELVOPTS="-i -p ${PORT}"
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -15,7 +15,7 @@ VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -23,4 +23,4 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
exit 0
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
ecdsafail=0
|
||||
$SHELL ../testcrypto.sh -q ecdsa || ecdsafail=1
|
||||
|
||||
if [ $ecdsafail = 1 ]; then
|
||||
echo_i "This test requires support for ECDSA cryptography." >&2
|
||||
exit 255
|
||||
else
|
||||
echo ecdsa > supported
|
||||
fi
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -13,13 +13,13 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
||||
ISCLIBS = ../../../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
|
||||
DNSDEPLIBS = ../../../../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../../../../lib/isc/libisc.@A@
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh ecdsa
|
||||
@@ -1,125 +0,0 @@
|
||||
; File written on Mon Oct 16 09:16:28 2017
|
||||
; dnssec_signzone version 9.11.2
|
||||
signed. 120 IN SOA ns.signed. hostmaster.ns.signed. (
|
||||
1 ; serial
|
||||
3600 ; refresh (1 hour)
|
||||
1200 ; retry (20 minutes)
|
||||
604800 ; expire (1 week)
|
||||
60 ; minimum (1 minute)
|
||||
)
|
||||
120 RRSIG SOA 3 1 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BJDbUrXS4UzBrTeNUMA0sSGYd+h9M5d8qzsE
|
||||
q7RJyDtUNJIwP5vAnSQ= )
|
||||
120 NS ns.signed.
|
||||
120 RRSIG NS 3 1 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BGoYuOkkcTAYnym27q2BgqkjUgP/0/Tip1yc
|
||||
txRS1D0CipTUZhCNrXc= )
|
||||
120 MX 10 mx.signed.
|
||||
120 RRSIG MX 3 1 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BOUPCSEEJ8dZ0oWeiYEvGIonjagvM1OS+mEY
|
||||
i5VUmysn7kArWqeFERs= )
|
||||
60 NSEC a-only.signed. NS SOA MX RRSIG NSEC DNSKEY
|
||||
60 RRSIG NSEC 3 1 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BBzvCsFw4EgfrIsFOu5IjP2gncm8dntwHaMD
|
||||
IeJ6g6s7IOwFT5nyrOU= )
|
||||
120 DNSKEY 256 3 3 (
|
||||
BPXo3mJOeCCuorn7Hc7bxR3QDHrJvq9gUpPS
|
||||
s8QYF3eiSpB97c8Br7fFzFYHQCJWWnCtpt1E
|
||||
h7SveJSl1ASNl9W2KE6hDNXfDX+ixDOtFZ/7
|
||||
PCh/obX36VK86EH+ZBNLxxEy9tHHCGO08zy8
|
||||
3lWI3E5bk9a1sks2dy6hbQfMmyXWI5QwYS9D
|
||||
j5Vs5yeUQ5e6SPmIqgqpn6VnDtAIfR2My7/r
|
||||
/Jgf73gpZugZmn6wDbzNCyGIvtOJCHAY2OEg
|
||||
ZfACKVdJrXZ42NKcJCgSTd1xY81UyMI9QAMq
|
||||
64Lx/tENCo1GKBCk/1HMdiO6WKeXCJd1SYzN
|
||||
VM+n4fRzEkmVT9wfyiSmoq6SxjeqrRebDz8G
|
||||
42d4lsm2/0bmOlle+fva7LwtGOaS+tBqtD8K
|
||||
kexFaixL5iY+LB0Q
|
||||
) ; ZSK; alg = DSA ; key id = 17876
|
||||
120 DNSKEY 257 3 3 (
|
||||
BOOhXnn+YV6RQ+jRPdayrnC2cd9x5P77c1/6
|
||||
Ev41qaWl1N7QRDXYh7VDS1UowoPbvQOvgQU0
|
||||
X7+zKWrB8UQcdsUe96IH/wPab1qkJlKanZni
|
||||
uFdB/2sTvQ6yabIC41dItnGeuN9VY1qwCa7T
|
||||
4QFRVYyDPKgxo7MRLq9YoUN8RTcB6lY1BH9Z
|
||||
QgcHZljAFVgU1Zc/6DZlQeBZyJafwIR+I7Eq
|
||||
Oe+rR44ZeD5JRgI1OwGyw/b1wKUxFhM+4XJi
|
||||
i8mQ1mrvzZ27iQbYP4WEzaskU6P5X+nPrTFi
|
||||
tLEaPugt8Oe7+lHLjpHvHzSOJZ5Radfiqgzg
|
||||
GGOzj1qmLfKLdRmp4VuBQ+1kguiz9D3ev89d
|
||||
pzP7dYHuSdCjc9X0fLmPjU1xD6RyLCDEmUm7
|
||||
eeRP55SiTiQCzJFr
|
||||
) ; KSK; alg = DSA ; key id = 3746
|
||||
120 RRSIG DNSKEY 3 1 120 (
|
||||
20820519023008 20140501011600 3746 signed.
|
||||
BFuLN7ACQrD6/3WaieXRD1JpSXW9s+/xCZ1x
|
||||
0ihUT1iKNvJS8F4Pafc= )
|
||||
120 RRSIG DNSKEY 3 1 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BN+8hbh1FGTNqHds0In57dPr5fVRU/P28dZa
|
||||
zIP19bAwTH/ZvgrqUF0= )
|
||||
a-only.signed. 120 IN NS 1.0.0.1.signed.
|
||||
60 NSEC aaaa-only.signed. NS RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BHpGpjMihpoIykHTpK1XmkVn0jqSST3/K6Fx
|
||||
vTaIb24rpkTriaXxChM= )
|
||||
aaaa-only.signed. 120 IN AAAA 2001:db8::2
|
||||
120 RRSIG AAAA 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BOvYax/3CDnEKTtbc6zoP4hYwhMe5SoXZh0w
|
||||
muzBWw9bEH+Bdt1ZEQ4= )
|
||||
60 NSEC dual.signed. AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BIqxE79TUnT2DUuocTitGhTNGnLs0+3sLJdz
|
||||
8haJbyH8pig1h7mqimU= )
|
||||
dual.signed. 120 IN A 1.0.0.3
|
||||
120 RRSIG A 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BIGL70eEIGVDW0gcYpEWgCFv4ne14hutQCMh
|
||||
gQ6kcEbl2qszosJA60E= )
|
||||
120 AAAA 2001:db8::3
|
||||
120 RRSIG AAAA 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BCmwk+ng/x1O7MhheK8MgAXYFVDDbyiZ76RV
|
||||
iwQrPRm0ThNRtsQU+UY= )
|
||||
60 NSEC mx.signed. A AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BLlLAIHF4SX/eWMCkUvj0XTFmaOp3xnifqkL
|
||||
nSWOAqtzJ5fwAdbNBdM= )
|
||||
ns.signed. 120 IN A 10.53.0.1
|
||||
120 RRSIG A 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BJ+Wll7VfNEjM4EfLY2rlx74oIwKRg9pjcJO
|
||||
Zxt6GHQIJ2D6EfyMZ00= )
|
||||
120 AAAA fd92:7065:b8e:ffff::1
|
||||
120 RRSIG AAAA 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BGT/agHn4qcHzLV2hYcGeLJ6Tz1to9sTB8LI
|
||||
lMwkV/KUu6UO7yvrnYk= )
|
||||
60 NSEC signed. A AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BNe3XmEGd/xxoh8FN3T3V9G1enCzNQJ7l3G+
|
||||
D3QPrp7mYtPAGMxCLlc= )
|
||||
mx.signed. 120 IN A 1.0.0.3
|
||||
120 RRSIG A 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BMlIQp1acUSUvgzV1CWlM0+cS1bGkFsbS6HQ
|
||||
d0S6TbNV+uNw0S1q0Dk= )
|
||||
120 AAAA 2001:db8::3
|
||||
120 RRSIG AAAA 3 2 120 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BGtSuYQF7sRVT5OdVHPJjm0PERzSp4v+d/DP
|
||||
Vp2UD0vSVSr3Vj2Wi4M= )
|
||||
60 NSEC ns.signed. A AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 (
|
||||
20820519023008 20140501011600 17876 signed.
|
||||
BMzQWws37wYfHvLnqgvjd+j5dkzBb2RYhrQk
|
||||
ykM0GnTAR6ZpmgQO6jc= )
|
||||
@@ -1,110 +0,0 @@
|
||||
; File written on Thu May 1 12:22:01 2014
|
||||
; dnssec_signzone version 9.8.5-P1
|
||||
signed. 120 IN SOA ns.utld. hostmaster.ns.utld. (
|
||||
1 ; serial
|
||||
3600 ; refresh (1 hour)
|
||||
1200 ; retry (20 minutes)
|
||||
604800 ; expire (1 week)
|
||||
60 ; minimum (1 minute)
|
||||
)
|
||||
120 RRSIG SOA 3 1 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BMC1gbQgLgNsb9G6rElwoY6Krb6lV/WFsd/j
|
||||
LO3aVnPXgU/noM1IBjs= )
|
||||
120 NS ns.utld.
|
||||
120 RRSIG NS 3 1 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BF9dWcW8GHL4QMp7rbeQgfUQmwEvskiMFqgt
|
||||
GJqepDLkV4WXtw3TRK4= )
|
||||
120 MX 10 mx.signed.
|
||||
120 RRSIG MX 3 1 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BJ7bngL8eZ9GrjQvHj0FDOgk2M6+YoW+cIAh
|
||||
ZjGKcK431aUFMS3YSGE= )
|
||||
60 NSEC a-only.signed. NS SOA MX RRSIG NSEC DNSKEY
|
||||
60 RRSIG NSEC 3 1 60 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BHMei3tCaM9eYTPLRn93c6qp9ADL1Hxy+HlN
|
||||
cLTyzzC+UxjUoI9O2VI= )
|
||||
120 DNSKEY 256 3 3 (
|
||||
BPLuLs4Ylbx3WZ8Ebj6GF+uEfI+J+RcaI1G3
|
||||
TW4JHqVqeBa0gkPjnCDsK9VeUx5CR8i/T18f
|
||||
YrOSojvASvdvG+TLNN9Jx+5A7c/43WzDOe2B
|
||||
jeAlfZSl1Bie/ccGL6W1+lVvlO0OHI54EoKs
|
||||
KxRub2izdouH4867a8dwahBlm14oWYXjqk3+
|
||||
/ubDCPdXdTUvvLnDd9zyDpWYBXisb/3F8R1v
|
||||
IcqyKDfJSTQSofLK+JlD+n7cv7U7pQWQn2qA
|
||||
t/NkGcwF8EAbiQPmcF1BY6NnEMQ5XxNayAF5
|
||||
Eza+i/kf3hLtS12cqW8hWm7aRYZWbzC4uUZL
|
||||
WGK0XfAK2d/vT8ZMZo1oaYEvy3xHwfsFgrFV
|
||||
qebm2ZFEomHpQ4KOSL1UhVI8uegUgnnovHjC
|
||||
eS4q72Fh+LZTD8C4
|
||||
) ; key id = 20366
|
||||
120 DNSKEY 257 3 3 (
|
||||
BPLuLs4Ylbx3WZ8Ebj6GF+uEfI+J+RcaI1G3
|
||||
TW4JHqVqeBa0gkPjnCDsK9VeUx5CR8i/T18f
|
||||
YrOSojvASvdvG+TLNN9Jx+5A7c/43WzDOe2B
|
||||
jeAlfZSl1Bie/ccGL6W1+lVvlO0OHI54EoKs
|
||||
KxRub2izdouH4867a8dwahBlm14oWYXjqk3+
|
||||
/ubDCPdXdTUvvLnDd9zyDpWYBXisb/3F8R1v
|
||||
IcqyKDfJSTQSofLK+JlD+n7cv7U7pQWQn2qA
|
||||
t/NkGcwF8EAbiQPmcF1BY6NnEMQ5XxNayAF5
|
||||
Eza+i/kf3hLtS12cqW8hWm7aRYZWbzC4uUZL
|
||||
WGK0XfAK2d/vT8ZMZo1oaYEvy3xHwfsFgrFV
|
||||
qebm2ZFEomHpQ4KOSL1UhVI8uegUgnnovHjC
|
||||
eS4q72Fh+LZTD8C4
|
||||
) ; key id = 20367
|
||||
120 RRSIG DNSKEY 3 1 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BBhlUYWd3f00zsSl+UJTxeVZUimQP8iMjf6j
|
||||
Q7uPoI37BUz9NbZhTCg= )
|
||||
120 RRSIG DNSKEY 3 1 120 20820519033608 (
|
||||
20140501012201 20367 signed.
|
||||
BHPcogpnebYByfzp/KT53GsIiT3yPk/4atwj
|
||||
NNsPFmVLqb/6yjotWQ0= )
|
||||
a-only.signed. 120 IN NS 1.0.0.1.signed.
|
||||
60 NSEC aaaa-only.signed. NS RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BF1Wt+NtJ1Cuoj1H1D9BCS33ImdgkZeyEKuz
|
||||
8FT66wAFigkXQ1zNofw= )
|
||||
aaaa-only.signed. 120 IN AAAA 2001:db8::2
|
||||
120 RRSIG AAAA 3 2 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BJFHllFzB91E/NWN1KjgmLuXQgDsGqBOuMuk
|
||||
eNEc0RmToi3wV+TZwt0= )
|
||||
60 NSEC dual.signed. AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BGfjvmN9LAHU2r9hXKgZRwyL4mZt4N/uBR1y
|
||||
TKOGBOyx6b0hVHmGPnw= )
|
||||
dual.signed. 120 IN A 1.0.0.3
|
||||
120 RRSIG A 3 2 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BEHMwkdjcbK++gvR/a36hSHf+uLwNUpbwKiw
|
||||
PpmEz0be+gavwU0qSmY= )
|
||||
120 AAAA 2001:db8::3
|
||||
120 RRSIG AAAA 3 2 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BPKR07CI/4KFd5L7aLMvQifiYDb1EbAP2BIp
|
||||
SgErW40i5qkFz9u588s= )
|
||||
60 NSEC mx.signed. A AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BGJ0Ei6QbWJva3NwVSE/Bojcodsbu0sSVVLJ
|
||||
QE8F5puTbx6qZ2dqrv4= )
|
||||
mx.signed. 120 IN A 1.0.0.3
|
||||
120 RRSIG A 3 2 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BOyL/Pi5Ih/Xt3b1icWIqoagM7ZKXzPKrmbQ
|
||||
VOZIvn0nmCj/gjShka4= )
|
||||
120 AAAA 2001:db8::3
|
||||
120 RRSIG AAAA 3 2 120 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BL1n80SXkdcDRaFa66xHIrMMFiYUnrM0zoGj
|
||||
ArI7APPAxthUKN+ptAQ= )
|
||||
60 NSEC signed. A AAAA RRSIG NSEC
|
||||
60 RRSIG NSEC 3 2 60 20820519033608 (
|
||||
20140501012201 20366 signed.
|
||||
BG6+zIJRFY4HqyUzPLcErSJibgtxxqfuHGYP
|
||||
kXX9V0coQ3zBC92s2jo= )
|
||||
@@ -19,12 +19,5 @@ copy_setports ns2/named1.conf.in ns2/named.conf
|
||||
copy_setports ns3/named1.conf.in ns3/named.conf
|
||||
copy_setports ns4/named1.conf.in ns4/named.conf
|
||||
|
||||
if $SHELL ../testcrypto.sh -q
|
||||
then
|
||||
(cd ns1 && $SHELL -e sign.sh)
|
||||
(cd ns4 && $SHELL -e sign.sh)
|
||||
else
|
||||
echo_i "using pre-signed zones"
|
||||
cp -f ns1/signed.db.presigned ns1/signed.db.signed
|
||||
cp -f ns4/signed.db.presigned ns4/signed.db.signed
|
||||
fi
|
||||
(cd ns1 && $SHELL -e sign.sh)
|
||||
(cd ns4 && $SHELL -e sign.sh)
|
||||
|
||||
@@ -76,7 +76,7 @@ case "$1" in
|
||||
for ns in 1 2 3 4 5 6 7 8
|
||||
do
|
||||
[ $i -gt 0 -a $ns -gt 2 ] && break
|
||||
int=`expr $i \* 10 + $ns - 1`
|
||||
int=`expr $i \* 10 + $ns`
|
||||
case "$sys" in
|
||||
*-pc-solaris2.5.1)
|
||||
ifconfig lo0:$int 10.53.$i.$ns \
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -9,6 +9,9 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
if $PERL -e 'use Net::DNS;' 2>/dev/null
|
||||
then
|
||||
:
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -142,25 +142,20 @@ grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
if $SHELL ../testcrypto.sh > /dev/null 2>&1
|
||||
then
|
||||
$PERL $SYSTEMTESTTOP/stop.pl . ns1
|
||||
$PERL $SYSTEMTESTTOP/stop.pl . ns1
|
||||
|
||||
copy_setports ns1/named2.conf.in ns1/named.conf
|
||||
copy_setports ns1/named2.conf.in ns1/named.conf
|
||||
|
||||
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1
|
||||
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +tcp @10.53.0.1 edns512-notcp soa > dig.out.test$n
|
||||
grep "status: SERVFAIL" dig.out.test$n > /dev/null ||
|
||||
grep "connection timed out;" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
else
|
||||
echo_i "skipping checking recursive lookup to edns 512 + no tcp + trust anchor fails as crypto not enabled"
|
||||
fi
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +tcp @10.53.0.1 edns512-notcp soa > dig.out.test$n
|
||||
grep "status: SERVFAIL" dig.out.test$n > /dev/null ||
|
||||
grep "connection timed out;" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
SYSTEMTESTTOP=..
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
exec $SHELL ../testcrypto.sh
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user