#include <polarssl/rsa.h>
#include <polarssl/error.h>
#include <polarssl/version.h>
-
-#if POLARSSL_VERSION_MAJOR > 1 || POLARSSL_VERSION_MINOR >= 3
-#define USE_VERSION_1_3
-#else
-#define x509_crt x509_cert
-#endif
+#include <polarssl/entropy.h>
struct ustream_ssl_ctx {
-#ifdef USE_VERSION_1_3
pk_context key;
-#else
- rsa_context key;
-#endif
+ x509_crt ca_cert;
x509_crt cert;
- int auth;
bool server;
};
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);