Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2015-04-10 05:21:10 +0300
committerAdam Langley <agl@google.com>2015-04-13 23:23:29 +0300
commit83a82981dc81b4699f6d7aa423e32712af71a55a (patch)
treefcbbae35a2812510bbd259779a51216fc7a43f63 /tool/speed.cc
parent7d897a1bf2abab32f3e6200ee15930d68ae87ad6 (diff)
Rename BIO_print_errors_fp back to ERR_print_errors_fp & refactor it.
A previous change in BoringSSL renamed ERR_print_errors_fp to BIO_print_errors_fp as part of refactoring the code to improve the layering of modules within BoringSSL. Rename it back for better compatibility with code that was using the function under the original name. Move its definition back to crypto/err using an implementation that avoids depending on crypto/bio. Change-Id: Iee7703bb1eb4a3d640aff6485712bea71d7c1052 Reviewed-on: https://boringssl-review.googlesource.com/4310 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'tool/speed.cc')
-rw-r--r--tool/speed.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/tool/speed.cc b/tool/speed.cc
index d16b1645..3834a684 100644
--- a/tool/speed.cc
+++ b/tool/speed.cc
@@ -22,8 +22,8 @@
#include <time.h>
#include <openssl/aead.h>
-#include <openssl/bio.h>
#include <openssl/digest.h>
+#include <openssl/err.h>
#include <openssl/obj.h>
#include <openssl/rsa.h>
@@ -147,7 +147,7 @@ static bool SpeedRSA(const std::string& key_name, RSA *key) {
sig.get(), &sig_len, key);
})) {
fprintf(stderr, "RSA_sign failed.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
results.Print(key_name + " signing");
@@ -158,7 +158,7 @@ static bool SpeedRSA(const std::string& key_name, RSA *key) {
sizeof(fake_sha256_hash), sig.get(), sig_len, key);
})) {
fprintf(stderr, "RSA_verify failed.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
results.Print(key_name + " verify");
@@ -199,7 +199,7 @@ static bool SpeedAEADChunk(const EVP_AEAD *aead, const std::string &name,
EVP_AEAD_DEFAULT_TAG_LENGTH,
evp_aead_seal)) {
fprintf(stderr, "Failed to create EVP_AEAD_CTX.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
@@ -213,7 +213,7 @@ static bool SpeedAEADChunk(const EVP_AEAD *aead, const std::string &name,
nonce_len, in, chunk_len, ad.get(), ad_len);
})) {
fprintf(stderr, "EVP_AEAD_CTX_seal failed.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
@@ -250,7 +250,7 @@ static bool SpeedHashChunk(const EVP_MD *md, const std::string &name,
EVP_DigestFinal_ex(ctx, digest, &md_len);
})) {
fprintf(stderr, "EVP_DigestInit_ex failed.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
@@ -273,7 +273,7 @@ bool Speed(const std::vector<std::string> &args) {
inp = kDERRSAPrivate2048;
if (NULL == d2i_RSAPrivateKey(&key, &inp, kDERRSAPrivate2048Len)) {
fprintf(stderr, "Failed to parse RSA key.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return false;
}
@@ -287,7 +287,7 @@ bool Speed(const std::vector<std::string> &args) {
inp = kDERRSAPrivate4096;
if (NULL == d2i_RSAPrivateKey(&key, &inp, kDERRSAPrivate4096Len)) {
fprintf(stderr, "Failed to parse 4096-bit RSA key.\n");
- BIO_print_errors_fp(stderr);
+ ERR_print_errors_fp(stderr);
return 1;
}