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:
authorMatt Braithwaite <mab@google.com>2015-04-25 05:16:50 +0300
committerAdam Langley <agl@google.com>2015-08-21 20:39:05 +0300
commit685402fadd8e90f1cd70ded7f7590600128d7d89 (patch)
tree561c5b70a52b9bb83342fbfd0a6fd3391a044543
parente9c283025e739ddb98f1f4b5fa3b6f0d9da1688b (diff)
Recognize PEM-encoded DSA private keys.
This change makes |EVP_PKEY_asn1_find_str|, which is used by |PEM_read_bio_PrivateKey|, recognize "DSA" as well as "EC" and "RSA". Change-Id: I39cce12f600cec6a71df75312a41f8395429af62 Reviewed-on: https://boringssl-review.googlesource.com/5743 Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r--crypto/evp/evp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/evp.c b/crypto/evp/evp.c
index a8116aad..5822379e 100644
--- a/crypto/evp/evp.c
+++ b/crypto/evp/evp.c
@@ -322,6 +322,8 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pengine,
return &rsa_asn1_meth;
} if (len == 2 && memcmp(name, "EC", 2) == 0) {
return &ec_asn1_meth;
+ } else if (len == 3 && memcmp(name, "DSA", 3) == 0) {
+ return &dsa_asn1_meth;
}
return NULL;
}