ミラー元
git://git.gnupg.org/gnupg.git
同期済み 2025-07-02 22:46:30 +02:00
This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
このコミットが含まれているのは:
コミット
7b6f1902d0
19個のファイルの変更、11994行の追加、0行の削除
68
tests/ChangeLog
ノーマルファイル
68
tests/ChangeLog
ノーマルファイル
|
@ -0,0 +1,68 @@
|
|||
2002-12-04 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* inittests (gpgsm.conf): Fake system time.
|
||||
|
||||
2002-10-31 Neal H. Walfield <neal@g10code.de>
|
||||
|
||||
* Makefile.am (inittests.stamp): Do not set LD_LIBRARY_PATH here.
|
||||
(TESTS_ENVIRONMENT): Do it here. And also frob $(LIBGCRYPT_LIBS)
|
||||
and $(PTH_LIBS).
|
||||
|
||||
2002-10-31 Neal H. Walfield <neal@g10code.de>
|
||||
|
||||
* asschk.c (die): New macro.
|
||||
(read_assuan): If in verbose mode, dump the string that was read.
|
||||
(write_assuan): Be more verbose on failure.
|
||||
|
||||
2002-09-04 Neal H. Walfield <neal@g10code.de>
|
||||
|
||||
* Makefile.am (inittests.stamp): Do not set LD_LIBRARY_PATH, but
|
||||
rather prepend it. Be more robust and prefer printf over echo -n.
|
||||
|
||||
2002-09-04 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* asschk.c (start_server): Close the parent's file descriptors in
|
||||
the child.
|
||||
(read_assuan): Variable NREAD removed. Cut off the received line
|
||||
currectly if more than one line was read.
|
||||
|
||||
2002-09-03 Neal H. Walfield <neal@g10code.de>
|
||||
|
||||
* Makefile.am (inittests.stamp): Construct an LD_LIBRARY_PATH from
|
||||
LDFLAGS.
|
||||
|
||||
2002-08-09 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* asschk.c (cmd_getenv): New.
|
||||
(expand_line): Allow / as variable name delimiter.
|
||||
* sm-sign+verify, sm-verify: Use $srcdir so that a VPATH build works.
|
||||
|
||||
* Makefile.am: Fixes for make dist.
|
||||
* samplekets/Makefile.am: New.
|
||||
|
||||
2002-08-08 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* asschk.c: Added some new features.
|
||||
* runtest, inittests: New.
|
||||
* text-1.txt, text-2.txt, text-3.txt: New.
|
||||
* text-1.osig.pem, text-1.dsig.pem, text-1.osig-bad.pem: New.
|
||||
* text-2.osig.pem, text-2.osig-bad.pem: New.
|
||||
* samplekeys : New directory
|
||||
* sm-verify, sm-sign+verify: The first test scripts.
|
||||
|
||||
2002-08-06 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* Makefile.am, asschk.c: New.
|
||||
|
||||
|
||||
Copyright 2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
78
tests/Makefile.am
ノーマルファイル
78
tests/Makefile.am
ノーマルファイル
|
@ -0,0 +1,78 @@
|
|||
# Makefile.am -tests makefile for libxtime
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GnuPG.
|
||||
#
|
||||
# GnuPG is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GnuPG is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
GPGSM = ../sm/gpgsm
|
||||
|
||||
# We can't unset a variable here so we unset GPG_AGENT_INFO in runtest
|
||||
TESTS_ENVIRONMENT = GNUPGHOME=`pwd` LC_ALL=C GPGSM=$(GPGSM) \
|
||||
LD_LIBRARY_PATH=$$(seen=0; \
|
||||
for i in $(LDFLAGS) $(LIBGCRYPT_LIBS) $(PTH_LIBS); \
|
||||
do \
|
||||
if echo "$$i" | egrep '^-L' >/dev/null 2>&1; \
|
||||
then \
|
||||
if test $$seen = 0; \
|
||||
then \
|
||||
seen=1; \
|
||||
else \
|
||||
printf ":"; \
|
||||
fi; \
|
||||
printf "%s" "$${i}" | sed 's/^-L//'; \
|
||||
fi; \
|
||||
done; \
|
||||
if test $$seen != 0 \
|
||||
&& test x$${LD_LIBRARY_PATH} != x; \
|
||||
then \
|
||||
printf ":"; \
|
||||
fi; \
|
||||
printf "%s" "$${LD_LIBRARY_PATH}") $(srcdir)/runtest
|
||||
|
||||
testscripts = sm-sign+verify sm-verify
|
||||
|
||||
EXTRA_DIST = runtest inittests $(testscripts) \
|
||||
text-1.txt text-2.txt text-3.txt \
|
||||
text-1.osig.pem text-1.dsig.pem text-1.osig-bad.pem \
|
||||
text-2.osig.pem text-2.osig-bad.pem \
|
||||
samplekeys/32100C27173EF6E9C4E9A25D3D69F86D37A4F939.key \
|
||||
samplekeys/cert_g10code_pete1.pem \
|
||||
samplekeys/cert_g10code_test1.pem \
|
||||
samplekeys/cert_g10code_theo1.pem
|
||||
|
||||
TESTS = $(testscripts)
|
||||
|
||||
CLEANFILES = inittests.stamp x y y z out err
|
||||
*.lock .\#lk*
|
||||
|
||||
DISTCLEANFILES = pubring.kbx~ random_seed
|
||||
|
||||
noinst_PROGRAMS = asschk
|
||||
|
||||
asschk_SOURCES = asschk.c
|
||||
|
||||
|
||||
all-local: inittests.stamp
|
||||
|
||||
clean-local:
|
||||
srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests --clean
|
||||
|
||||
inittests.stamp: inittests
|
||||
srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests
|
||||
echo timestamp >./inittests.stamp
|
||||
|
1059
tests/asschk.c
ノーマルファイル
1059
tests/asschk.c
ノーマルファイル
ファイル差分が大きすぎるため省略します
差分を読み込み
99
tests/inittests
実行可能ファイル
99
tests/inittests
実行可能ファイル
|
@ -0,0 +1,99 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This file is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
set -e
|
||||
|
||||
sample_certs='
|
||||
cert_g10code_test1.pem
|
||||
cert_g10code_pete1.pem
|
||||
cert_g10code_theo1.pem
|
||||
'
|
||||
|
||||
private_keys='
|
||||
32100C27173EF6E9C4E9A25D3D69F86D37A4F939
|
||||
'
|
||||
|
||||
clean_files='
|
||||
gpgsm.conf gpg-agent.conf trustlist.txt pubring.kbx
|
||||
msg msg.sig msg.unsig
|
||||
'
|
||||
|
||||
|
||||
[ -z "$srcdir" ] && srcdir=.
|
||||
[ -z "$GPGSM" ] && GPGSM=../sm/gpgsm
|
||||
|
||||
if [ -d $srcdir/samplekeys ] \
|
||||
&& grep TESTS_ENVIRONMENT Makefile >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
# During make distclean the Makefile has already been removed,
|
||||
# so we need this extra test.
|
||||
if ! grep gnupg-test-directory testdir.stamp >/dev/null 2>&1; then
|
||||
echo "inittests: please cd to the tests directory first" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "--clean" ]; then
|
||||
if [ -d private-keys-v1.d ]; then
|
||||
rm private-keys-v1.d/* 2>/dev/null || true
|
||||
rmdir private-keys-v1.d
|
||||
fi
|
||||
rm ${clean_files} testdir.stamp 2>/dev/null || true
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$GNUPGHOME" != "`pwd`" ]; then
|
||||
echo "inittests: please set GNUPGHOME to the test directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$GPG_AGENT_INFO" ]; then
|
||||
echo "inittests: please unset GPG_AGENT_INFO" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# A stamp file used with --clean
|
||||
echo gnupg-test-directory > testdir.stamp
|
||||
|
||||
|
||||
# Create the private key directy if it does not exists and copy
|
||||
# the sample keys.
|
||||
[ -d private-keys-v1.d ] || mkdir private-keys-v1.d
|
||||
for i in ${private_keys}; do
|
||||
cat ${srcdir}/samplekeys/$i.key >private-keys-v1.d/$i.key
|
||||
done
|
||||
|
||||
# Create the configuration scripts
|
||||
# Note, die to an expired test certificate, we need to use
|
||||
# the faked system time option.
|
||||
cat > gpgsm.conf <<EOF
|
||||
no-secmem-warning
|
||||
disable-crl-checks
|
||||
agent-program ../agent/gpg-agent
|
||||
faked-system-time 1038835799
|
||||
EOF
|
||||
|
||||
cat > gpg-agent.conf <<EOF
|
||||
no-grab
|
||||
pinentry-program /home/wk/work/pinentry/gtk/pinentry-gtk
|
||||
EOF
|
||||
|
||||
cat > trustlist.txt <<EOF
|
||||
# CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=Düsseldorf,C=DE
|
||||
3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E S
|
||||
EOF
|
||||
|
||||
# Make sure that the sample certs are available but ignore errors here
|
||||
# because we are not a test script.
|
||||
for i in ${sample_certs}; do
|
||||
$GPGSM --import ${srcdir}/samplekeys/$i || true
|
||||
done
|
読み込み中…
Add table
Add a link
新しいイシューから参照