private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
523 stars 153 forks source link

Server 0-RTT Option #1589

Closed benjaminteyssier closed 7 months ago

benjaminteyssier commented 7 months ago

Hi, it would be great if it were possible for a server to have an option to activate 0-RTT or not. I'm testing with picoquic demo but I cannot manage to disable 0-RTT and have only 1-RTT handshakes between client and server. Is there a way to do that which I did not find ?

huitema commented 7 months ago

You are correct, this option was not programmed in picoquicdemo yet.

You can force 1-RTT by deleting the "ticket" store. After a successful connection to a server, picoquicdemo saves the session resume tickets that it received in a local file, by default demo_ticket_store.bin. That file is loaded the next time the program runs. If it contains a ticket for the destination, that ticket will be used to resume the TLS session and enable 0-RTT. If you delete that file, 0-RTT cannot be used.

benjaminteyssier commented 7 months ago

Thank you for you quick answer and the great work on picoquic !