From b78c016649d13c48429c132e56314117f8f3d9d7 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Tue, 9 Mar 2021 14:43:28 +1000 Subject: Add ossl_pem_check_suffix symbol Partial fix for #12964 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14473) --- crypto/pem/pem_lib.c | 8 ++++---- crypto/pem/pem_pkey.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crypto/pem') diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 7695699c73..c8e0b264da 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -29,7 +29,7 @@ static int load_iv(char **fromp, unsigned char *to, int num); static int check_pem(const char *nm, const char *name); -int pem_check_suffix(const char *pem_str, const char *suffix); +int ossl_pem_check_suffix(const char *pem_str, const char *suffix); int PEM_def_callback(char *buf, int num, int rwflag, void *userdata) { @@ -138,7 +138,7 @@ static int check_pem(const char *nm, const char *name) return 1; if (strcmp(nm, PEM_STRING_PKCS8INF) == 0) return 1; - slen = pem_check_suffix(nm, "PRIVATE KEY"); + slen = ossl_pem_check_suffix(nm, "PRIVATE KEY"); if (slen > 0) { /* * NB: ENGINE implementations won't contain a deprecated old @@ -154,7 +154,7 @@ static int check_pem(const char *nm, const char *name) if (strcmp(name, PEM_STRING_PARAMETERS) == 0) { int slen; const EVP_PKEY_ASN1_METHOD *ameth; - slen = pem_check_suffix(nm, "PARAMETERS"); + slen = ossl_pem_check_suffix(nm, "PARAMETERS"); if (slen > 0) { ENGINE *e; ameth = EVP_PKEY_asn1_find_str(&e, nm, slen); @@ -1006,7 +1006,7 @@ int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data, * string "RSA". */ -int pem_check_suffix(const char *pem_str, const char *suffix) +int ossl_pem_check_suffix(const char *pem_str, const char *suffix) { int pem_len = strlen(pem_str); int suffix_len = strlen(suffix); diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 26c6bbbaf6..e5b740f214 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -27,7 +27,7 @@ #include "crypto/evp.h" #include "pem_local.h" -int pem_check_suffix(const char *pem_str, const char *suffix); +int ossl_pem_check_suffix(const char *pem_str, const char *suffix); static EVP_PKEY *pem_read_bio_key(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u, -- cgit v1.2.3