Use the new TLSv1.3 certificate_required alert where appropriate
[openssl.git] / ssl / packet.c
index 87473fbbce9fdb44ccf60929d2b4792b539b8aa1..3479f1fed8b2a0d4421aef199455d425411fa16b 100644 (file)
@@ -232,12 +232,10 @@ int WPACKET_fill_lengths(WPACKET *pkt)
     if (pkt->subs == NULL)
         return 0;
 
-    sub = pkt->subs;
-    do {
+    for (sub = pkt->subs; sub != NULL; sub = sub->parent) {
         if (!wpacket_intern_close(pkt, sub, 0))
             return 0;
-        sub = sub->parent;
-    } while (sub != NULL);
+    }
 
     return 1;
 }