Changes between 0.9.2b and 0.9.3
+ *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and
+ SSL2_SERVER_VERSION (not used at all) macros, which are now the
+ same as SSL2_VERSION anyway.
+ [Bodo Moeller]
+
+ *) New "-showcerts" option for s_client.
+ [Bodo Moeller]
+
*) Still more PKCS#12 integration. Add pkcs12 application to openssl
application. Various cleanups and fixes.
[Steve Henson]
#endif
static int c_Pause=0;
static int c_debug=0;
+static int c_showcerts=0;
#ifndef NOPROTO
static void sc_usage(void);
BIO_printf(bio_err," -CAfile arg - PEM format file of CA's\n");
BIO_printf(bio_err," -reconnect - Drop and re-make the connection with the same Session-ID\n");
BIO_printf(bio_err," -pause - sleep(1) after each read(2) and write(2) system call\n");
+ BIO_printf(bio_err," -showcerts - show all certificates in the chain\n");
BIO_printf(bio_err," -debug - extra output\n");
BIO_printf(bio_err," -nbio_test - more ssl protocol testing\n");
BIO_printf(bio_err," -state - print the 'ssl' states\n");
c_Pause=0;
c_quiet=0;
c_debug=0;
+ c_showcerts=0;
if (bio_err == NULL)
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
c_Pause=1;
else if (strcmp(*argv,"-debug") == 0)
c_debug=1;
+ else if (strcmp(*argv,"-showcerts") == 0)
+ c_showcerts=1;
else if (strcmp(*argv,"-nbio_test") == 0)
nbio_test=1;
else if (strcmp(*argv,"-state") == 0)
X509_NAME_oneline(X509_get_issuer_name((X509 *)
sk_value(sk,i)),buf,BUFSIZ);
BIO_printf(bio," i:%s\n",buf);
+ if (c_showcerts)
+ PEM_write_bio_X509(bio,(X509 *) sk_value(sk,i));
}
}
if (peer != NULL)
{
BIO_printf(bio,"Server certificate\n");
- PEM_write_bio_X509(bio,peer);
+ if (!c_showcerts) /* Redundant if we showed the whole chain */
+ PEM_write_bio_X509(bio,peer);
X509_NAME_oneline(X509_get_subject_name(peer),
buf,BUFSIZ);
BIO_printf(bio,"subject=%s\n",buf);
p=buf; /* header */
d=p+9; /* data section */
*(p++)=SSL2_MT_CLIENT_HELLO; /* type */
- s2n(SSL2_CLIENT_VERSION,p); /* version */
+ s2n(SSL2_VERSION,p); /* version */
n=j=0;
n=ssl_cipher_list_to_bytes(s,SSL_get_ciphers(s),d);
#define SSL2_VERSION 0x0002
#define SSL2_VERSION_MAJOR 0x00
#define SSL2_VERSION_MINOR 0x02
-#define SSL2_CLIENT_VERSION 0x0002
-#define SSL2_SERVER_VERSION 0x0002
+/* #define SSL2_CLIENT_VERSION 0x0002 */
+/* #define SSL2_SERVER_VERSION 0x0002 */
/* Protocol Message Codes */
#define SSL2_MT_ERROR 0