Convert remaining functions in statem_srvr.c to use SSLfatal()
[openssl.git] / ssl / statem / extensions_srvr.c
index 5ce4df42c2c4a364083faf6a0c1a4a91a85ec6e7..7adb555e441f04452afdb3d3e5c293532680fe09 100644 (file)
@@ -1080,8 +1080,11 @@ EXT_RETURN tls_construct_stoc_status_request(SSL *s, WPACKET *pkt,
      * send back an empty extension, with the certificate status appearing as a
      * separate message
      */
      * send back an empty extension, with the certificate status appearing as a
      * separate message
      */
-    if ((SSL_IS_TLS13(s) && !tls_construct_cert_status_body(s, pkt))
-            || !WPACKET_close(pkt)) {
+    if (SSL_IS_TLS13(s) && !tls_construct_cert_status_body(s, pkt)) {
+       /* SSLfatal() already called */
+       return EXT_RETURN_FAIL; 
+    }
+    if (!WPACKET_close(pkt)) {
         SSLfatal(s, SSL_AD_INTERNAL_ERROR,
                  SSL_F_TLS_CONSTRUCT_STOC_STATUS_REQUEST, ERR_R_INTERNAL_ERROR);
         return EXT_RETURN_FAIL;
         SSLfatal(s, SSL_AD_INTERNAL_ERROR,
                  SSL_F_TLS_CONSTRUCT_STOC_STATUS_REQUEST, ERR_R_INTERNAL_ERROR);
         return EXT_RETURN_FAIL;