New ctrls to retrieve supported signature algorithms and curves and
extensions to s_client and s_server to print out retrieved valued.

Extend CERT structure to cache supported signature algorithm data.
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index bdaca8b..ad5dc71 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -506,6 +506,11 @@
 
 	CERT_PKEY pkeys[SSL_PKEY_NUM];
 
+	/* Array of pairs of NIDs for signature algorithm extension */
+	TLS_SIGALGS *sigalgs;
+	/* Size of above array */
+	size_t sigalgslen;
+
 	int references; /* >1 only if SSL_copy_session_id is used */
 	} CERT;
 
@@ -534,7 +539,19 @@
 
 	int references; /* actually always 1 at the moment */
 	} SESS_CERT;
-
+/* Structure containing decoded values of signature algorithms extension */
+struct tls_sigalgs_st
+	{
+	/* NID of hash algorithm */
+	int hash_nid;
+	/* NID of signature algorithm */
+	int sign_nid;
+	/* Combined hash and signature NID */
+	int signandhash_nid;
+	/* Raw values used in extension */
+	unsigned char rsign;
+	unsigned char rhash;
+	};
 
 /*#define MAC_DEBUG	*/