Procházet zdrojové kódy

OCSP Extension Encoding Fix

1. Removed redundant check for the output being NULL in
   `EncodeOcspRequestExtensions()`. The chuck of code being protected
   only cared about the value of ret, not the pointer. The code was
   supposed to calculate the size of the data without writing it.
John Safranek před 2 měsíci
rodič
revize
6462986bf2
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      wolfcrypt/src/asn.c

+ 1 - 1
wolfcrypt/src/asn.c

@@ -36642,7 +36642,7 @@ word32 EncodeOcspRequestExtensions(OcspRequest* req, byte* output, word32 size)
 
         CALLOC_ASNSETDATA(dataASN, ocspNonceExtASN_Length, ret, req->heap);
 
-        if ((ret == 0) && (output != NULL)) {
+        if (ret == 0) {
             /* Set nonce extension OID and nonce. */
             SetASN_Buffer(&dataASN[OCSPNONCEEXTASN_IDX_EXT_OID], NonceObjId,
                     sizeof(NonceObjId));