sqlog partial

jean-frederic clere jfclere at gmail.com
Thu Jul 18 08:47:53 UTC 2024


On 7/18/24 10:04 AM, Tomas Mraz wrote:
> You could try calling fcloseall() before the exit() call.

That doesn't help. In fact I have changed ssl/quic/qlog.c:
  static void qlog_event_epilogue(QLOG *qlog)
  {
+    int ret;
      ossl_json_object_end(&qlog->json);

      ossl_json_key(&qlog->json, "time");
@@ -390,6 +391,11 @@ static void qlog_event_epilogue(QLOG *qlog)
      }

      ossl_json_object_end(&qlog->json);
+    ossl_qlog_flush(qlog); /* best effort */
+    ret = BIO_flush(qlog->bio);
+    if (ret) {
+      printf("rate!\n");
+    }
  }

Now I have my trace:
+++
{"packet_type":"1RTT","packet_number":9,"dcid":"868bbbcafeca0b7b"},"datagram_id":7,"frames":[{"frame_type":"ack","ack_delay":0,"acked_ranges":[[0,5]],"length":5}]},"time":1}
^^{"name":"transport:packet_received","data":{"header":{"packet_type":"1RTT","packet_number":10,"dcid":"868bbbcafeca0b7b"},"datagram_id":8,"frames":[{"frame_type":"ack","ack_delay":0,"acked_ranges":[[0,7]],"length":5}]},"time":0}
^^{"name":"transport:packet_received","data":{"header":{"packet_type":"1RTT","packet_number":11,"dcid":"868bbbcafeca0b7b"},"datagram_id":9,"frames":[{"frame_type":"stream","stream_id":2,"offset":58,"payload_length":12,"explicit_length":true,"length":4}]},"time":12840}
+++
So chrome is sending a setting which the ossl-nghttp3-demo-server 
doesn't like :-(

> 
> Tomas Mraz, OpenSSL
> 
> On Wed, 2024-07-17 at 20:30 +0200, jean-frederic clere wrote:
>> Hi,
>>
>> I have built with enable-unstable-qlog, but when I exit (via exit(1))
>> the sqlog files are truncated:
>> +++
>> ^^{"name":"transport:packet_received","data":{"header":{"packet_type"
>> :"1RTT","packet_number":5,"dcid":"1f6cb8c5033c1937"},"datagram_id":3,
>> "frames":[{"frame_type":"stream","stream_id":2,"offset":0,"payload_le
>> ngth":0,"explicit_length":false,"length":2}]},"time":0}
>> ^^{"name":"transport:packet_received","data":{"header":{"packet_type"
>> :"1RTT","packet_number":6,"dcid":"1f6cb8c5033c1937"},"datagram_id":4,
>> "frames":[{"frame_type":"stream","stream_id":2,"offset":45,"payload_l
>> ength":12,"explicit_length":true,"length":4}]},"time":0}
>> ^^{"name":"transport:packet_sen
>> +++
>> Is there a way to write the files before exiting?
>>
> 

-- 
Cheers

Jean-Frederic



More information about the openssl-users mailing list