diff options
author | David Benjamin <davidben@google.com> | 2016-03-26 01:07:11 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-03-31 23:50:33 +0300 |
commit | 981936791eb76c52daedb18310fced187252ed30 (patch) | |
tree | 65dcde1bd667ed5d50a0d0dcfd64391308e2f07a /crypto/evp | |
parent | 5d38f78e2987be876e3023808b4eed57c84ce23c (diff) |
Remove some easy obj.h dependencies.
A lot of consumers of obj.h only want the NID values. Others didn't need
it at all. This also removes some OBJ_nid2sn and OBJ_nid2ln calls in EVP
error paths which isn't worth pulling a large table in for.
BUG=chromium:499653
Change-Id: Id6dff578f993012e35b740a13b8e4f9c2edc0744
Reviewed-on: https://boringssl-review.googlesource.com/7563
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/evp.c | 4 | ||||
-rw-r--r-- | crypto/evp/evp_ctx.c | 4 | ||||
-rw-r--r-- | crypto/evp/p_ec.c | 2 | ||||
-rw-r--r-- | crypto/evp/p_rsa.c | 2 | ||||
-rw-r--r-- | crypto/evp/print.c | 3 |
5 files changed, 6 insertions, 9 deletions
diff --git a/crypto/evp/evp.c b/crypto/evp/evp.c index 22d262cc..79993aab 100644 --- a/crypto/evp/evp.c +++ b/crypto/evp/evp.c @@ -63,7 +63,7 @@ #include <openssl/ec.h> #include <openssl/err.h> #include <openssl/mem.h> -#include <openssl/obj.h> +#include <openssl/nid.h> #include <openssl/rsa.h> #include <openssl/thread.h> @@ -320,7 +320,7 @@ int EVP_PKEY_set_type(EVP_PKEY *pkey, int type) { ameth = evp_pkey_asn1_find(type); if (ameth == NULL) { OPENSSL_PUT_ERROR(EVP, EVP_R_UNSUPPORTED_ALGORITHM); - ERR_add_error_dataf("algorithm %d (%s)", type, OBJ_nid2sn(type)); + ERR_add_error_dataf("algorithm %d", type); return 0; } diff --git a/crypto/evp/evp_ctx.c b/crypto/evp/evp_ctx.c index 491b13ee..f510f6c7 100644 --- a/crypto/evp/evp_ctx.c +++ b/crypto/evp/evp_ctx.c @@ -60,7 +60,6 @@ #include <openssl/err.h> #include <openssl/mem.h> -#include <openssl/obj.h> #include "internal.h" @@ -97,8 +96,7 @@ static EVP_PKEY_CTX *evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) { if (pmeth == NULL) { OPENSSL_PUT_ERROR(EVP, EVP_R_UNSUPPORTED_ALGORITHM); - const char *name = OBJ_nid2sn(id); - ERR_add_error_dataf("algorithm %d (%s)", id, name); + ERR_add_error_dataf("algorithm %d", id); return NULL; } diff --git a/crypto/evp/p_ec.c b/crypto/evp/p_ec.c index 49521827..f92c87cf 100644 --- a/crypto/evp/p_ec.c +++ b/crypto/evp/p_ec.c @@ -66,7 +66,7 @@ #include <openssl/ecdsa.h> #include <openssl/err.h> #include <openssl/mem.h> -#include <openssl/obj.h> +#include <openssl/nid.h> #include "internal.h" #include "../ec/internal.h" diff --git a/crypto/evp/p_rsa.c b/crypto/evp/p_rsa.c index 629c33a6..a2106572 100644 --- a/crypto/evp/p_rsa.c +++ b/crypto/evp/p_rsa.c @@ -64,7 +64,7 @@ #include <openssl/digest.h> #include <openssl/err.h> #include <openssl/mem.h> -#include <openssl/obj.h> +#include <openssl/nid.h> #include <openssl/rsa.h> #include "../rsa/internal.h" diff --git a/crypto/evp/print.c b/crypto/evp/print.c index b637c708..56521ec5 100644 --- a/crypto/evp/print.c +++ b/crypto/evp/print.c @@ -495,8 +495,7 @@ static EVP_PKEY_PRINT_METHOD *find_method(int type) { static int print_unsupported(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr) { BIO_indent(out, indent, 128); - BIO_printf(out, "%s algorithm \"%s\" unsupported\n", kstr, - OBJ_nid2ln(pkey->type)); + BIO_printf(out, "%s algorithm unsupported\n", kstr); return 1; } |