summaryrefslogtreecommitdiffstats
path: root/crypto/pem
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-03-09 14:43:28 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-03-18 17:52:38 +1000
commitb78c016649d13c48429c132e56314117f8f3d9d7 (patch)
tree8dd0807b549158862ca4f18910375b55c2643fb9 /crypto/pem
parent4669015d7b0784d00812f6b015ca8080e37ff70b (diff)
Add ossl_pem_check_suffix symbol
Partial fix for #12964 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem_lib.c8
-rw-r--r--crypto/pem/pem_pkey.c2
2 files changed, 5 insertions, 5 deletions
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,