Dup GnuTLS test to OpenSSL
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 5 Aug 2015 20:19:40 +0000 (21:19 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 6 Aug 2015 10:02:32 +0000 (11:02 +0100)
test/log/5600
test/scripts/5600-OCSP-OpenSSL/5600
test/scripts/5650-OCSP-GnuTLS/5650
test/src/client.c
test/stdout/5600

index a680612a7b2fc4ca61d7c04c55dd8f911d16710b..65ce5511838f78910d2f7142a5ae1d9868a7e5b7 100644 (file)
@@ -1,7 +1,13 @@
+1999-03-02 09:44:33 1: Server sends good staple on request
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
 1999-03-02 09:44:33 acl_mail: ocsp in status: 4 (verified)
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
 1999-03-02 09:44:33 acl_mail: ocsp in status: 4 (verified)
+1999-03-02 09:44:33 2: Server does not staple an outdated response
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
+1999-03-02 09:44:33 3: Server does not staple a response for a revoked cert
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
+1999-03-02 09:44:33 4: Connection functions when server is prepared to staple but client does not request it
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 acl_conn: ocsp in status: 0 (notreq)
index c7a700fde2e317ab734bf2b6994280724baddbe4..2e63d0e0a921e5f3daac8d4496fe67bc99f66844 100644 (file)
@@ -2,7 +2,9 @@
 #
 #
 #
 #
 #
 #
-# 1: Server sends good staple on request
+exim -z '1: Server sends good staple on request'
+****
+#
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp
 ****
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp
 ****
@@ -30,7 +32,9 @@ killdaemon
 #
 #
 #
 #
 #
 #
-# 2: Server does not staple an outdated response
+exim -z '2: Server does not staple an outdated response'
+****
+#
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.dated.resp
 ****
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.dated.resp
 ****
@@ -54,7 +58,9 @@ killdaemon
 #
 #
 #
 #
 #
 #
-# 3: Server does not staple a response for a revoked cert
+exim -z '3: Server does not staple a response for a revoked cert'
+****
+#
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.revoked.resp
 ****
 exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.revoked.resp
 ****
@@ -78,3 +84,36 @@ killdaemon
 #
 #
 #
 #
 #
 #
+exim -z '4: Connection functions when server is prepared to staple but client does not request it'
+****
+#
+exim -bd -oX PORT_D -DSERVER=server \
+ -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp
+****
+#
+client-ssl \
+ HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+starttls
+??? 220
+ehlo rhu.barb.tls
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250
+quit
+****
+killdaemon
+#
+#
+#
+#
+#
index 343d6af2f1cbd200fd0a2f18a2170e7784ca0ae4..749d87048df406dcb5963a4ae6b19b84c2736944 100644 (file)
@@ -91,9 +91,6 @@ exim -bd -oX PORT_D -DSERVER=server \
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp
 ****
 #
  -DOCSP=DIR/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp
 ****
 #
-# Temporarily (I hope) use OpenSSL-based client, as GnuTLS is buggy and always requests (and understands)
-# stapling
-#
 client-gnutls \
  HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
 ??? 220
 client-gnutls \
  HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
 ??? 220
index dd7df5bd69bfed40db6430cf7afbdc6411424905..ee00912bc9e2e6ce5d09c044335fbb0da78d4ac0 100644 (file)
@@ -84,9 +84,9 @@ latter needs a whole pile of tables. */
 # if GNUTLS_VERSION_NUMBER >= 0x030103
 #  define HAVE_OCSP
 #  include <gnutls/ocsp.h>
 # if GNUTLS_VERSION_NUMBER >= 0x030103
 #  define HAVE_OCSP
 #  include <gnutls/ocsp.h>
-#  ifndef GNUTLS_NO_EXTENSIONS
-#   define GNUTLS_NO_EXTENSIONS 0
-#  endif
+# endif
+# ifndef GNUTLS_NO_EXTENSIONS
+#  define GNUTLS_NO_EXTENSIONS 0
 # endif
 
 # define DH_BITS      768
 # endif
 
 # define DH_BITS      768
index ce8638213b9aaaf2df0f35f6d15d577671c7824d..d2d28dce6f8afca945d77234ccd0cc8d5d481282 100644 (file)
@@ -133,3 +133,56 @@ SSL info: SSL negotiation finished successfully
 SSL connection using AES256-SHA
 Succeeded in starting TLS
 End of script
 SSL connection using AES256-SHA
 Succeeded in starting TLS
 End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+Certificate file = aux-fixed/cert2
+Key file = aux-fixed/cert2
+??? 220
+<<< 220 server1.example.com ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> ehlo rhu.barb
+??? 250-
+<<< 250-server1.example.com Hello rhu.barb [ip4.ip4.ip4.ip4]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-
+<<< 250-STARTTLS
+??? 250
+<<< 250 HELP
+>>> starttls
+??? 220
+<<< 220 TLS go ahead
+Attempting to start TLS
+SSL info: before/connect initialization
+SSL info: before/connect initialization
+SSL info: SSLv3 read server hello A
+SSL info: SSLv3 read server certificate A
+SSL info: SSLv3 read server certificate request A
+SSL info: SSLv3 read server done A
+SSL info: SSLv3 write client certificate A
+SSL info: SSLv3 write client key exchange A
+SSL info: SSLv3 write certificate verify A
+SSL info: SSLv3 write change cipher spec A
+SSL info: SSLv3 write finished A
+SSL info: SSLv3 flush data
+SSL info: SSLv3 read server session ticket A
+SSL info: SSLv3 read finished A
+SSL info: SSL negotiation finished successfully
+SSL info: SSL negotiation finished successfully
+SSL connection using AES256-SHA
+Succeeded in starting TLS
+>>> ehlo rhu.barb.tls
+??? 250-
+<<< 250-server1.example.com Hello rhu.barb.tls [ip4.ip4.ip4.ip4]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250
+<<< 250 HELP
+>>> quit
+End of script