From 97e9bbbd0bec880b45253e7cef2e799a1d7a46af Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 29 Jul 2019 00:37:06 +0100 Subject: [PATCH] mbedtls: wrapper: avoid redefine forward-typedef of X509_STORE_CTX Some toolchains are in some C++ version mode that objects to redefinition of a typedef even to the same thing. Shift a couple for function declarations in the mbedtls wrapper part so they can piggyback on just the one typedef for their args. --- lib/tls/mbedtls/wrapper/include/internal/ssl_types.h | 3 +++ lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h b/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h index 324336549..1f5f94884 100644 --- a/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h +++ b/lib/tls/mbedtls/wrapper/include/internal/ssl_types.h @@ -301,6 +301,9 @@ struct pkey_method_st { #define OPENSSL_NPN_NEGOTIATED 1 +int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); +int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); + #ifdef __cplusplus } #endif diff --git a/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h b/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h index e57e42bde..d5b0d1a21 100644 --- a/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h +++ b/lib/tls/mbedtls/wrapper/include/internal/x509_vfy.h @@ -104,11 +104,6 @@ #define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72 -typedef void X509_STORE_CTX; -int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); -int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); - - #ifdef __cplusplus } #endif