authorgravatar for purriebrightstar@gmail.comPurrie <purriebrightstar@gmail.com> 2023-07-21 15:18:12+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-16 13:02:00-08:00
logc4a1b54ebefb77122d2055b09bc0bf01bbc1d8b6
tree28313d514333359e6ef04fd8e8c29b7d33152bb7
parentc724cc64871e0e7274b232689c07417e59de5918

tls client interface consistency fix

Client for tls was using a function that wasn't declared on the interface for it. The issue wasn't apparent because net stream implemented that function. I changed it to keep the interface promise of what's required to be compatible with the tls client functionality.

1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/crypto/tls/Client.zig+5-1
......@@ -662,7 +662,11 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In
662662 P.AEAD.encrypt(ciphertext, auth_tag, &out_cleartext, ad, nonce, p.client_handshake_key);
663663
664664 const both_msgs = client_change_cipher_spec_msg ++ finished_msg;
665 try stream.writeAll(&both_msgs);
665 var both_msgs_vec = [_]std.os.iovec_const{.{
666 .iov_base = &both_msgs,
667 .iov_len = both_msgs.len,
668 }};
669 try stream.writevAll(&both_msgs_vec);
666670
667671 const client_secret = hkdfExpandLabel(P.Hkdf, p.master_secret, "c ap traffic", &handshake_hash, P.Hash.digest_length);
668672 const server_secret = hkdfExpandLabel(P.Hkdf, p.master_secret, "s ap traffic", &handshake_hash, P.Hash.digest_length);