summaryrefslogtreecommitdiff
path: root/asn.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-04-16 00:38:29 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-04-16 00:38:29 +0000
commitbe120e172040881760f6580c362e503ab4366928 (patch)
treecfa2629bee9feaa2b8b724012ee5134cf0a4c14d /asn.cpp
parentef222b93eafef6f3d5e5983cd0c0a927050e8086 (diff)
downloadcryptopp-be120e172040881760f6580c362e503ab4366928.tar.gz
fix bug decoding optional parameters
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@316 57ff6487-cd31-0410-9ec3-f628ee90f5f0
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 91bae2f..3ebbaf7 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);