projects
/
project
/
ustream-ssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
polarssl: add support for version 1.3
[project/ustream-ssl.git]
/
ustream-polarssl.h
diff --git
a/ustream-polarssl.h
b/ustream-polarssl.h
index
86bdc36
..
e7445f7
100644
(file)
--- a/
ustream-polarssl.h
+++ b/
ustream-polarssl.h
@@
-25,10
+25,21
@@
#include <polarssl/x509.h>
#include <polarssl/rsa.h>
#include <polarssl/error.h>
#include <polarssl/x509.h>
#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
struct ustream_polarssl_ctx {
struct ustream_polarssl_ctx {
- x509_cert cert;
+#ifdef USE_VERSION_1_3
+ pk_context key;
+#else
rsa_context key;
rsa_context key;
+#endif
+ x509_crt cert;
bool server;
};
bool server;
};