polarssl: check us->notify_verify_error for NULL before calling it
[project/ustream-ssl.git] / ustream-polarssl.h
index e7445f75cde366bbf3e965ba6e241a8a6a53bcde..527c14a759a41651743343eb9ed12d41202e7156 100644 (file)
 #define x509_crt x509_cert
 #endif
 
-struct ustream_polarssl_ctx {
+struct ustream_ssl_ctx {
 #ifdef USE_VERSION_1_3
        pk_context key;
 #else
        rsa_context key;
 #endif
+       x509_crt ca_cert;
        x509_crt cert;
        bool server;
 };
@@ -49,7 +50,8 @@ static inline char *__ustream_ssl_strerror(int error, char *buffer, int len)
        return buffer;
 }
 
+void __ustream_ssl_update_peer_cn(struct ustream_ssl *us);
 void __ustream_ssl_session_free(void *ssl);
-void *__ustream_ssl_session_new(void *ctx);
+void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx);
 
 #endif