summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-10-01 22:54:19 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-10-01 22:54:19 +0000
commitd8db251fd3f644dfe7c35db2cb58281505c5e54a (patch)
tree39440a0da5e878be0ee23943cdb7f322f5b83240 /lib
parent07c716f7d0c98c31bc9661ecc032ff38a0315948 (diff)
import OpenSSL-1.0.0a
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/modes/Makefile77
-rw-r--r--lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod2
-rw-r--r--lib/libssl/src/test/testtsa.com65
3 files changed, 39 insertions, 105 deletions
diff --git a/lib/libssl/src/crypto/modes/Makefile b/lib/libssl/src/crypto/modes/Makefile
index c825b12f258..6c85861b6c5 100644
--- a/lib/libssl/src/crypto/modes/Makefile
+++ b/lib/libssl/src/crypto/modes/Makefile
@@ -10,27 +10,21 @@ CFLAG=-g
MAKEFILE= Makefile
AR= ar r
-MODES_ASM_OBJ=
-
CFLAGS= $(INCLUDES) $(CFLAG)
-ASFLAGS= $(INCLUDES) $(ASFLAG)
-AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=
APPS=
LIB=$(TOP)/libcrypto.a
-LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c gcm128.c \
- ccm128.c xts128.c
-LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o gcm128.o \
- ccm128.o xts128.o $(MODES_ASM_OBJ)
+LIBSRC= cbc128.c ctr128.c cts128.c cfb128.c ofb128.c
+LIBOBJ= cbc128.o ctr128.o cts128.o cfb128.o ofb128.o
SRC= $(LIBSRC)
#EXHEADER= store.h str_compat.h
EXHEADER= modes.h
-HEADER= modes_lcl.h $(EXHEADER)
+HEADER= $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
@@ -44,24 +38,6 @@ lib: $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind.
@touch lib
-ghash-ia64.s: asm/ghash-ia64.pl
- $(PERL) asm/ghash-ia64.pl $@ $(CFLAGS)
-ghash-x86.s: asm/ghash-x86.pl
- $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-ghash-x86_64.s: asm/ghash-x86_64.pl
- $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@
-ghash-sparcv9.s: asm/ghash-sparcv9.pl
- $(PERL) asm/ghash-sparcv9.pl $@ $(CFLAGS)
-ghash-alpha.s: asm/ghash-alpha.pl
- $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
-ghash-parisc.s: asm/ghash-parisc.pl
- $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
-
-# GNU make "catch all"
-ghash-%.S: asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
-
-ghash-armv4.o: ghash-armv4.S
-
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -95,47 +71,12 @@ dclean:
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
-cbc128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-cbc128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-cbc128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-cbc128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-cbc128.o: ../../include/openssl/symhacks.h cbc128.c modes_lcl.h
-ccm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-ccm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-ccm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-ccm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-ccm128.o: ../../include/openssl/symhacks.h ccm128.c modes_lcl.h
-cfb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-cfb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-cfb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-cfb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-cfb128.o: ../../include/openssl/symhacks.h cfb128.c modes_lcl.h
-ctr128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-ctr128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-ctr128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-ctr128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-ctr128.o: ../../include/openssl/symhacks.h ctr128.c modes_lcl.h
-cts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-cts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-cts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-cts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-cts128.o: ../../include/openssl/symhacks.h cts128.c modes_lcl.h
-gcm128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-gcm128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-gcm128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-gcm128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-gcm128.o: ../../include/openssl/symhacks.h gcm128.c modes_lcl.h
-ofb128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-ofb128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-ofb128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-ofb128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-ofb128.o: ../../include/openssl/symhacks.h modes_lcl.h ofb128.c
-xts128.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
-xts128.o: ../../include/openssl/modes.h ../../include/openssl/opensslconf.h
-xts128.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-xts128.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-xts128.o: ../../include/openssl/symhacks.h modes_lcl.h xts128.c
+cbc128.o: cbc128.c modes.h
+cfb128.o: cfb128.c modes.h
+ctr128.o: ctr128.c modes.h
+cts128.o: cts128.c modes.h
+ofb128.o: modes.h ofb128.c
diff --git a/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod b/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod
index f3605eb8264..e2a2a8c6f8d 100644
--- a/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod
+++ b/lib/libssl/src/doc/crypto/EVP_PKEY_verifyrecover.pod
@@ -74,7 +74,7 @@ Recover digest originally signed using PKCS#1 and SHA256 digest:
/* Error */
/* Determine buffer length */
- if (EVP_PKEY_verifyrecover(ctx, NULL, &routlen, sig, siglen) <= 0)
+ if (EVP_PKEY_verifyrecover(ctx, rout, &routlen, sig, siglen) <= 0)
/* Error */
rout = OPENSSL_malloc(routlen);
diff --git a/lib/libssl/src/test/testtsa.com b/lib/libssl/src/test/testtsa.com
index 29fb1d0e63e..e3c586f14a2 100644
--- a/lib/libssl/src/test/testtsa.com
+++ b/lib/libssl/src/test/testtsa.com
@@ -2,17 +2,14 @@ $!
$! A few very basic tests for the 'ts' time stamping authority command.
$!
$
-$ __arch = "VAX"
+$ __arch := VAX
$ if f$getsyi("cpu") .ge. 128 then -
__arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
-$ if __arch .eqs. "" then __arch = "UNK"
-$!
-$ if (p4 .eqs. "64") then __arch = __arch+ "_64"
-$!
-$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
+$ if __arch .eqs. "" then __arch := UNK
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
$
-$ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'"
-$ OPENSSL_CONF = "[-]CAtsa.cnf"
+$ openssl := mcr 'f$parse(exe_dir+"openssl.exe")'
+$ OPENSSL_CONF := [-]CAtsa.cnf
$ ! Because that's what ../apps/CA.sh really looks at
$ SSLEAY_CONFIG = "-config " + OPENSSL_CONF
$
@@ -117,8 +114,8 @@ $
$ time_stamp_response_token_test:
$ subroutine
$
-$ RESPONSE2 = p2+ "-copy_tsr"
-$ TOKEN_DER = p2+ "-token_der"
+$ RESPONSE2:='p2'.copy_tsr
+$ TOKEN_DER:='p2'.token_der
$ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out
$ if $severity .ne. 1 then call error
$ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2'
@@ -148,13 +145,13 @@ $ verify_time_stamp_token:
$ subroutine
$
$ ! create the token from the response first
-$ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out
+$ openssl ts -reply -in 'p2' -out 'p2'.token -token_out
$ if $severity .ne. 1 then call error
-$ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" -
- -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
+$ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in -
+ "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
$ if $severity .ne. 1 then call error
-$ openssl ts -verify -data "''p3'" -in "''p2'-token" -
- -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
+$ openssl ts -verify -data 'p3' -in 'p2'.token -token_in -
+ "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
$ if $severity .ne. 1 then call error
$ endsubroutine
$
@@ -170,8 +167,6 @@ $ endsubroutine
$
$ ! Main body ----------------------------------------------------------
$
-$ set noon
-$
$ write sys$output "Setting up TSA test directory..."
$ call setup_dir
$
@@ -188,68 +183,66 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..."
$ call create_time_stamp_request1
$
$ write sys$output "Printing req1.req..."
-$ call print_request "req1.tsq"
+$ call print_request req1.tsq
$
$ write sys$output "Generating valid response for req1.req..."
-$ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1"
+$ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1
$
$ write sys$output "Printing response..."
-$ call print_response "resp1.tsr"
+$ call print_response resp1.tsr
$
$ write sys$output "Verifying valid response..."
-$ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com"
+$ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com
$
$ write sys$output "Verifying valid token..."
-$ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com"
+$ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com
$
$ ! The tests below are commented out, because invalid signer certificates
$ ! can no longer be specified in the config file.
$
$ ! write sys$output "Generating _invalid_ response for req1.req..."
-$ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2"
+$ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2
$
$ ! write sys$output "Printing response..."
-$ ! call print_response "resp1_bad.tsr"
+$ ! call print_response resp1_bad.tsr
$
$ ! write sys$output "Verifying invalid response, it should fail..."
-$ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr"
+$ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr
$
$ write sys$output "Creating req2.req time stamp request for file testtsa..."
$ call create_time_stamp_request2
$
$ write sys$output "Printing req2.req..."
-$ call print_request "req2.tsq"
+$ call print_request req2.tsq
$
$ write sys$output "Generating valid response for req2.req..."
-$ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1"
+$ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1
$
$ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..."
-$ call time_stamp_response_token_test "req2.tsq" "resp2.tsr"
+$ call time_stamp_response_token_test req2.tsq resp2.tsr
$
$ write sys$output "Printing response..."
-$ call print_response "resp2.tsr"
+$ call print_response resp2.tsr
$
$ write sys$output "Verifying valid response..."
-$ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com"
+$ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com
$
$ write sys$output "Verifying response against wrong request, it should fail..."
-$ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr"
+$ call verify_time_stamp_response_fail req1.tsq resp2.tsr
$
$ write sys$output "Verifying response against wrong request, it should fail..."
-$ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr"
+$ call verify_time_stamp_response_fail req2.tsq resp1.tsr
$
$ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..."
$ call create_time_stamp_request3
$
$ write sys$output "Printing req3.req..."
-$ call print_request "req3.tsq"
+$ call print_request req3.tsq
$
$ write sys$output "Verifying response against wrong request, it should fail..."
-$ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr"
+$ call verify_time_stamp_response_fail req3.tsq resp1.tsr
$
$ write sys$output "Cleaning up..."
$ call clean_up_dir
$
-$ set on
-$
$ exit