summaryrefslogtreecommitdiff
path: root/crypto/err
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/err')
-rw-r--r--crypto/err/err.c10
-rw-r--r--crypto/err/err_test.c15
2 files changed, 15 insertions, 10 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c
index fd3a76b..7ca2842 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -298,7 +298,7 @@ void ERR_remove_thread_state(const CRYPTO_THREADID *tid) {
OPENSSL_free(state);
}
-int ERR_get_next_error_library() {
+int ERR_get_next_error_library(void) {
err_fns_check();
return ERRFN(get_next_library)();
}
@@ -694,6 +694,7 @@ extern const ERR_STRING_DATA EC_error_string_data[];
extern const ERR_STRING_DATA EVP_error_string_data[];
extern const ERR_STRING_DATA OBJ_error_string_data[];
extern const ERR_STRING_DATA PEM_error_string_data[];
+extern const ERR_STRING_DATA PKCS8_error_string_data[];
extern const ERR_STRING_DATA RSA_error_string_data[];
extern const ERR_STRING_DATA X509V3_error_string_data[];
extern const ERR_STRING_DATA X509_error_string_data[];
@@ -746,6 +747,7 @@ static void err_load_strings(void) {
ERR_load_strings(EVP_error_string_data);
ERR_load_strings(OBJ_error_string_data);
ERR_load_strings(PEM_error_string_data);
+ ERR_load_strings(PKCS8_error_string_data);
ERR_load_strings(RSA_error_string_data);
ERR_load_strings(X509V3_error_string_data);
ERR_load_strings(X509_error_string_data);
@@ -760,11 +762,11 @@ void ERR_load_strings(const ERR_STRING_DATA *str) {
}
}
-void ERR_load_crypto_strings() { err_load_strings(); }
+void ERR_load_crypto_strings(void) { err_load_strings(); }
-void ERR_free_strings() {
+void ERR_free_strings(void) {
err_fns_check();
ERRFN(shutdown)();
}
-void ERR_load_BIO_strings() {}
+void ERR_load_BIO_strings(void) {}
diff --git a/crypto/err/err_test.c b/crypto/err/err_test.c
index 540ea07..230cada 100644
--- a/crypto/err/err_test.c
+++ b/crypto/err/err_test.c
@@ -14,11 +14,12 @@
#include <stdio.h>
+#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/mem.h>
-static int test_overflow() {
+static int test_overflow(void) {
unsigned i;
for (i = 0; i < ERR_NUM_ERRORS*2; i++) {
@@ -40,7 +41,7 @@ static int test_overflow() {
return 1;
}
-static int test_put_error() {
+static int test_put_error(void) {
uint32_t packed_error;
int line, flags;
const char *file;
@@ -72,7 +73,7 @@ static int test_put_error() {
return 1;
}
-static int test_clear_error() {
+static int test_clear_error(void) {
if (ERR_get_error() != 0) {
fprintf(stderr, "ERR_get_error returned value before an error was added.\n");
return 0;
@@ -89,7 +90,7 @@ static int test_clear_error() {
return 1;
}
-static int test_print() {
+static int test_print(void) {
size_t i;
char buf[256];
uint32_t packed_error;
@@ -105,13 +106,15 @@ static int test_print() {
return 1;
}
-static int test_release() {
+static int test_release(void) {
ERR_put_error(1, 2, 3, "test", 4);
ERR_remove_thread_state(NULL);
return 1;
}
-int main() {
+int main(void) {
+ CRYPTO_library_init();
+
if (!test_overflow() ||
!test_put_error() ||
!test_clear_error() ||