]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Update the SSL_rstate_string*() return value for QUIC
authorMatt Caswell <matt@openssl.org>
Tue, 25 Apr 2023 13:06:54 +0000 (14:06 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 27 Apr 2023 16:03:33 +0000 (17:03 +0100)
We make these APIs work more like the TLS versions do.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20827)

ssl/quic/quic_tls.c

index 2dedc760cbbe22dd0a339b9124dee058e376a110..98bf250f9342dfcc2a62fe7a5bb3a33ae7df7a22 100644 (file)
@@ -451,9 +451,9 @@ static void quic_get_state(OSSL_RECORD_LAYER *rl, const char **shortstr,
 {
     /*
      * According to the docs, valid read state strings are: "RH"/"read header",
-     * "RB"/"read body", "RD"/"read done" and "unknown"/"unknown". We don't
-     * read records in quite that way, so we report every "normal" state as
-     * "read done". In the event of error then we report "unknown".
+     * "RB"/"read body", and "unknown"/"unknown". We don't read records in quite
+     * that way, so we report every "normal" state as "read header". In the
+     * event of error then we report "unknown".
      */
 
     if (rl->qtls->inerror) {
@@ -463,9 +463,9 @@ static void quic_get_state(OSSL_RECORD_LAYER *rl, const char **shortstr,
             *longstr = "unknown";
     } else {
         if (shortstr != NULL)
-            *shortstr = "RD";
+            *shortstr = "RH";
         if (longstr != NULL)
-            *longstr = "read done";
+            *longstr = "read header";
     }
 }