X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=src%2Fssl%2Fssl_hs_common.t0;h=bbd37ac8a4ac7cea27c0b18bd279282c54223d15;hp=da6fc8adef39dc4128796067488c5cddf3e29669;hb=b42bd5972f935ffc32019acac6f8a07ae08ae9c2;hpb=9e71c0673a9f46f82e43125919619f296698292e;ds=inline diff --git a/src/ssl/ssl_hs_common.t0 b/src/ssl/ssl_hs_common.t0 index da6fc8a..bbd37ac 100644 --- a/src/ssl/ssl_hs_common.t0 +++ b/src/ssl/ssl_hs_common.t0 @@ -903,8 +903,14 @@ hexb| 0000 | \ List terminator. then endof - \ ChaCha20/Poly1305 - \ 5 of endof + \ ChaCha20+Poly1305 + 5 of drop + for-input if + switch-chapol-in + else + switch-chapol-out + then + endof ERR_BAD_PARAM fail endcase @@ -958,6 +964,22 @@ cc: switch-aesgcm-in ( is_client prf_id cipher_key_len -- ) { ENG->iaes_ctr, cipher_key_len); } +cc: switch-chapol-out ( is_client prf_id -- ) { + int is_client, prf_id; + + prf_id = T0_POP(); + is_client = T0_POP(); + br_ssl_engine_switch_chapol_out(ENG, is_client, prf_id); +} + +cc: switch-chapol-in ( is_client prf_id -- ) { + int is_client, prf_id; + + prf_id = T0_POP(); + is_client = T0_POP(); + br_ssl_engine_switch_chapol_in(ENG, is_client, prf_id); +} + \ Write Finished message. : write-Finished ( from_client -- ) compute-Finished