Make SSL_load_error_strings a no-op.

SSL_library_init already loads the error strings (unlike upstream). Code which
calls both will end up loading error strings twice. Instead make the second
call a no-op.

Change-Id: Ifd34ab20ed46aabeba14661e58f8dac2bbb29f69
Reviewed-on: https://boringssl-review.googlesource.com/2790
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 68c3535..61fb778 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1887,7 +1887,9 @@
 
 #endif
 
+/* SSL_load_error_strings does nothing. */
 OPENSSL_EXPORT void	SSL_load_error_strings(void );
+
 OPENSSL_EXPORT const char *SSL_state_string(const SSL *s);
 OPENSSL_EXPORT const char *SSL_rstate_string(const SSL *s);
 OPENSSL_EXPORT const char *SSL_state_string_long(const SSL *s);
@@ -2085,7 +2087,9 @@
 
 OPENSSL_EXPORT long SSL_get_default_timeout(const SSL *s);
 
-OPENSSL_EXPORT int SSL_library_init(void );
+/* SSL_library_init initializes the crypto and SSL libraries, loads their error
+ * strings, and returns one. */
+OPENSSL_EXPORT int SSL_library_init(void);
 
 OPENSSL_EXPORT const char *SSL_CIPHER_description(const SSL_CIPHER *,char *buf,int size);
 OPENSSL_EXPORT STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);
diff --git a/ssl/ssl_algs.c b/ssl/ssl_algs.c
index 71fabf0..6ec88bf 100644
--- a/ssl/ssl_algs.c
+++ b/ssl/ssl_algs.c
@@ -62,11 +62,10 @@
 
 int SSL_library_init(void) {
   CRYPTO_library_init();
-  SSL_load_error_strings();
+  ERR_load_crypto_strings();
+  ERR_load_strings(SSL_error_string_data);
   return 1;
 }
 
 void SSL_load_error_strings(void) {
-  ERR_load_crypto_strings();
-  ERR_load_strings(SSL_error_string_data);
 }