#include <polarssl/x509.h>
#include <polarssl/rsa.h>
#include <polarssl/error.h>
+#include <polarssl/version.h>
+#include <polarssl/entropy.h>
-struct ustream_polarssl_ctx {
- x509_cert cert;
- rsa_context key;
+struct ustream_ssl_ctx {
+ pk_context key;
+ x509_crt ca_cert;
+ x509_crt cert;
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(void *ctx);
+void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx);
#endif