summaryrefslogtreecommitdiff
path: root/asn.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2007-04-16 00:38:29 +0000
committerweidai <weidai11@users.noreply.github.com>2007-04-16 00:38:29 +0000
commit3802d23c077d20cf5e45e18e7438b907b1990992 (patch)
treecfa2629bee9feaa2b8b724012ee5134cf0a4c14d /asn.cpp
parentffd84849eb59379f97158f406455d3b34f830f05 (diff)
downloadcryptopp-git-3802d23c077d20cf5e45e18e7438b907b1990992.tar.gz
fix bug decoding optional parameters
Diffstat (limited to 'asn.cpp')
-rw-r--r--asn.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/asn.cpp b/asn.cpp
index 91bae2fd..3ebbaf76 100644
--- a/asn.cpp
+++ b/asn.cpp
@@ -550,7 +550,7 @@ void PKCS8PrivateKey::BERDecode(BufferedTransformation &bt)
BERSequenceDecoder algorithm(privateKeyInfo);
GetAlgorithmID().BERDecodeAndCheck(algorithm);
- bool parametersPresent = BERDecodeAlgorithmParameters(algorithm);
+ bool parametersPresent = algorithm.EndReached() ? false : BERDecodeAlgorithmParameters(algorithm);
algorithm.MessageEnd();
BERGeneralDecoder octetString(privateKeyInfo, OCTET_STRING);