aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pem
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem.h8
-rw-r--r--crypto/pem/pem2.h8
-rw-r--r--crypto/pem/pem_err.c3
-rw-r--r--crypto/pem/pem_lib.c2
4 files changed, 6 insertions, 15 deletions
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h
index 38b98015c4c..e4bae0b4aac 100644
--- a/crypto/pem/pem.h
+++ b/crypto/pem/pem.h
@@ -59,14 +59,14 @@
#ifndef HEADER_PEM_H
#define HEADER_PEM_H
-#include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/pem2.h>
-
#ifdef __cplusplus
extern "C" {
#endif
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+#include <openssl/pem2.h>
+
#define PEM_BUFSIZE 1024
#define PEM_OBJ_UNDEF 0
diff --git a/crypto/pem/pem2.h b/crypto/pem/pem2.h
index 4e484bcd82a..4a016aacd2a 100644
--- a/crypto/pem/pem2.h
+++ b/crypto/pem/pem2.h
@@ -57,12 +57,4 @@
* Ben 30 Jan 1999.
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
void ERR_load_PEM_strings(void);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/crypto/pem/pem_err.c b/crypto/pem/pem_err.c
index 8b1789b11c9..642129da204 100644
--- a/crypto/pem/pem_err.c
+++ b/crypto/pem/pem_err.c
@@ -54,8 +54,7 @@
*/
/* NOTE: this file was auto generated by the mkerr.pl script: any changes
- * made to it will be overwritten when the script next updates this file,
- * only reason strings will be preserved.
+ * made to it will be overwritten when the script next updates this file.
*/
#include <stdio.h>
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index b5e0a650f8d..072211ba0fe 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -373,7 +373,7 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
kstr=(unsigned char *)buf;
}
RAND_add(data,i,0);/* put in the RSA key. */
- if (RAND_pseudo_bytes(iv,8) < 0) /* Generate a salt */
+ if (RAND_bytes(iv,8) <= 0) /* Generate a salt */
goto err;
/* The 'iv' is used as the iv and as a salt. It is
* NOT taken from the BytesToKey function */