Add new ctrl to retrieve client certificate types, print out
details in s_client.

Also add ctrl to set client certificate types. If not used sensible values
will be included based on supported signature algorithms: for example if
we don't include any DSA signing algorithms the DSA certificate type is
omitted.

Fix restriction in old code where certificate types would be truncated
if it exceeded TLS_CT_NUMBER.
diff --git a/ssl/ssl.h b/ssl/ssl.h
index a3da0cc..0e78fb7 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -1664,6 +1664,8 @@
 #define SSL_CTRL_CLEAR_CERT_FLAGS		100
 #define SSL_CTRL_SET_CLIENT_SIGALGS		101
 #define SSL_CTRL_SET_CLIENT_SIGALGS_LIST	102
+#define SSL_CTRL_GET_CLIENT_CERT_TYPES		103
+#define SSL_CTRL_SET_CLIENT_CERT_TYPES		104
 
 #define DTLSv1_get_timeout(ssl, arg) \
 	SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)
@@ -1758,6 +1760,14 @@
 #define SSL_set1_client_sigalgs_list(ctx, s) \
 	SSL_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)s)
 
+#define SSL_get0_certificate_types(s, clist) \
+	SSL_ctrl(s, SSL_CTRL_GET_CLIENT_CERT_TYPES, 0, (char *)clist)
+
+#define SSL_CTX_set1_client_certificate_types(ctx, clist, clistlen) \
+	SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)clist)
+#define SSL_set1_client_certificate_types(s, clist, clistlen) \
+	SSL_ctrl(s,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)clist)
+
 #ifndef OPENSSL_NO_BIO
 BIO_METHOD *BIO_f_ssl(void);
 BIO *BIO_new_ssl(SSL_CTX *ctx,int client);