fixed missed initialization when not using ocsp nonces

pull/1/head
John Safranek 2012-12-20 15:29:15 -08:00
parent 51787db76b
commit 5164c15216
1 changed files with 1 additions and 1 deletions

View File

@ -4650,11 +4650,11 @@ int EncodeOcspRequest(OcspRequest* req)
req->serialSz = req->cert->serialSz;
snSz = SetSerialNumber(req->cert->serial, req->cert->serialSz, snArray);
extSz = 0;
if (req->useNonce) {
RNG rng;
if (InitRng(&rng) != 0) {
CYASSL_MSG("\tCannot initialize RNG. Skipping the OSCP Nonce.");
extSz = 0;
} else {
req->nonceSz = MAX_OCSP_NONCE_SZ;
RNG_GenerateBlock(&rng, req->nonce, req->nonceSz);