fix bug decoding optional parameters

import/raw
weidai 2007-04-16 00:38:29 +00:00
parent fe0ada7b9d
commit 345f7a500f
1 changed files with 1 additions and 1 deletions

View File

@ -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);