Delegate command line handling for many common options in s_client/s_server

to the SSL_CONF APIs.

This is complicated a little because the SSL_CTX structure is not available
when the command line is processed: so just check syntax of commands initially
and store them, ready to apply later.
This commit is contained in:
Dr. Stephen Henson
2012-11-17 14:42:22 +00:00
parent aa714f3af4
commit 5d2e07f182
4 changed files with 120 additions and 219 deletions

View File

@@ -195,3 +195,9 @@ void print_ssl_cert_checks(BIO *bio, SSL *s,
const unsigned char *checkhost,
const unsigned char *checkemail,
const char *checkip);
#ifdef HEADER_SSL_H
int args_ssl(char ***pargs, int *pargc, SSL_CONF_CTX *cctx,
int *badarg, BIO *err, STACK_OF(OPENSSL_STRING) **pstr);
int args_ssl_call(SSL_CTX *ctx, BIO *err, SSL_CONF_CTX *cctx,
STACK_OF(OPENSSL_STRING) *str);
#endif