examples: add .notify_write callback.
[project/ustream-ssl.git] / ustream-polarssl.h
index 70e8b42..dfc287d 100644 (file)
@@ -39,6 +39,7 @@ struct ustream_ssl_ctx {
 #else
        rsa_context key;
 #endif
+       x509_crt ca_cert;
        x509_crt cert;
        bool server;
 };
@@ -49,6 +50,12 @@ static inline char *__ustream_ssl_strerror(int error, char *buffer, int len)
        return buffer;
 }
 
+static inline void __ustream_ssl_set_server_name(struct ustream_ssl *us)
+{
+       ssl_set_hostname(us->ssl, us->server_name);
+}
+
+void __ustream_ssl_update_peer_cn(struct ustream_ssl *us);
 void __ustream_ssl_session_free(void *ssl);
 void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx);