From 8c2ddc20decbc927261089e330421251194cd865 Mon Sep 17 00:00:00 2001 From: Emmanuel Hocdet Date: Wed, 19 Jul 2017 16:04:05 +0200 Subject: [PATCH] BUILD: ssl: fix compatibility with openssl without TLSEXT_signature_* In openssl < 1.0.1, TLSEXT_signature_* is undefined. Add TLSEXT signatures (RFC 5246) when TLSEXT_signature_anonymous is undefined. --- include/proto/openssl-compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/proto/openssl-compat.h b/include/proto/openssl-compat.h index 6ff4fdd..a1e75b4 100644 --- a/include/proto/openssl-compat.h +++ b/include/proto/openssl-compat.h @@ -192,4 +192,13 @@ static inline int EVP_PKEY_base_id(EVP_PKEY *pkey) #define RAND_pseudo_bytes(x,y) RAND_bytes(x,y) #endif + +/* Signature from RFC 5246, missing in openssl < 1.0.1 */ +#ifndef TLSEXT_signature_anonymous +#define TLSEXT_signature_anonymous 0 +#define TLSEXT_signature_rsa 1 +#define TLSEXT_signature_dsa 2 +#define TLSEXT_signature_ecdsa 3 +#endif + #endif /* _PROTO_OPENSSL_COMPAT_H */ -- 1.7.10.4