Improve #include structure of pem{,2}.h
authorNick Mathewson <nickm@torproject.org>
Tue, 23 Jan 2018 15:48:35 +0000 (10:48 -0500)
committerRichard Levitte <levitte@openssl.org>
Fri, 9 Feb 2018 16:49:07 +0000 (17:49 +0100)
  - pem2.h is empty, so pem.h doesn't need to include it.
  - pem2.h once declared ERR_load_PEM_strings(), so it should now
    include pemerr.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5150)

include/openssl/pem.h
include/openssl/pem2.h

index 3b21ab8234bfc55c52b5c306d83e8c30e414c8bd..55bcd712e6636ba142ed8aac170b72a8ae657b27 100644 (file)
@@ -15,7 +15,6 @@
 # include <openssl/safestack.h>
 # include <openssl/evp.h>
 # include <openssl/x509.h>
-# include <openssl/pem2.h>
 # include <openssl/pemerr.h>
 
 #ifdef  __cplusplus
index 8a46324af35bfd4c32e9a52a3b5fa78523e0420d..bad7ac897fa7e9e2315c9b62db92ee07f1e73c59 100644 (file)
@@ -7,10 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
+#ifndef HEADER_PEM2_H
+# define HEADER_PEM2_H
+# include <openssl/pemerr.h>
 #endif