MEDIUM: ssl: add support for SNI and wildcard certificates

A side effect of this change is that the "ssl" keyword on "bind" lines is now
just a boolean and that "crt" is needed to designate certificate files or
directories.

Note that much refcounting was needed to have the free() work correctly due to
the number of cert aliases which can make a context be shared by multiple names.
diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h
index c630f08..9d04624 100644
--- a/include/proto/ssl_sock.h
+++ b/include/proto/ssl_sock.h
@@ -21,12 +21,18 @@
 
 #ifndef _PROTO_SSL_SOCK_H
 #define _PROTO_SSL_SOCK_H
+#include <openssl/ssl.h>
 
+#include <types/protocols.h>
 #include <types/stream_interface.h>
 
 extern struct data_ops ssl_sock;
 int ssl_sock_handshake(struct connection *conn, unsigned int flag);
-void ssl_sock_infocbk(const SSL *ssl, int where, int ret);
+int ssl_sock_load_cert(char *path, struct ssl_conf *ssl_conf, struct proxy *proxy);
+int ssl_sock_prepare_ctx(struct ssl_conf *ssl_conf, SSL_CTX *ctx, struct proxy *proxy);
+void ssl_sock_free_certs(struct ssl_conf *ssl_conf);
+int ssl_sock_prepare_all_ctx(struct ssl_conf *ssl_conf, struct proxy *px);
+void ssl_sock_free_all_ctx(struct ssl_conf *ssl_conf);
 
 #endif /* _PROTO_SSL_SOCK_H */