summaryrefslogtreecommitdiff
path: root/asn.cpp
diff options
context:
space:
mode:
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);