diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-03 02:05:59 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-03 02:05:59 -0800 |
| commit | 8a8fd47d217eadb8a45ec6b9325acfe1d42704d7 (patch) | |
| tree | e83269ebea160aa0934a13ef011e3a1252a827aa /lib/std | |
| parent | daf91ed8d1149d10f0e4a597efc9f17c4a49b0ca (diff) | |
| parent | f276bb107e3f33e0425558846f60f8ed079682d4 (diff) | |
| download | zig-8a8fd47d217eadb8a45ec6b9325acfe1d42704d7.tar.gz zig-8a8fd47d217eadb8a45ec6b9325acfe1d42704d7.zip | |
Merge pull request #18176 from jedisct1/aegis_sha512
TLS: The 0x1306 TLS identifier was updated to TLS_AEGIS_256_SHA512
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/crypto/tls.zig | 6 | ||||
| -rw-r--r-- | lib/std/crypto/tls/Client.zig | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/std/crypto/tls.zig b/lib/std/crypto/tls.zig index ae19307b6f..0713562738 100644 --- a/lib/std/crypto/tls.zig +++ b/lib/std/crypto/tls.zig @@ -290,7 +290,7 @@ pub const CipherSuite = enum(u16) { CHACHA20_POLY1305_SHA256 = 0x1303, AES_128_CCM_SHA256 = 0x1304, AES_128_CCM_8_SHA256 = 0x1305, - AEGIS_256_SHA384 = 0x1306, + AEGIS_256_SHA512 = 0x1306, AEGIS_128L_SHA256 = 0x1307, _, }; @@ -330,7 +330,7 @@ pub const HandshakeCipher = union(enum) { AES_128_GCM_SHA256: HandshakeCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256), AES_256_GCM_SHA384: HandshakeCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384), CHACHA20_POLY1305_SHA256: HandshakeCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256), - AEGIS_256_SHA384: HandshakeCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha384), + AEGIS_256_SHA512: HandshakeCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha512), AEGIS_128L_SHA256: HandshakeCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256), }; @@ -355,7 +355,7 @@ pub const ApplicationCipher = union(enum) { AES_128_GCM_SHA256: ApplicationCipherT(crypto.aead.aes_gcm.Aes128Gcm, crypto.hash.sha2.Sha256), AES_256_GCM_SHA384: ApplicationCipherT(crypto.aead.aes_gcm.Aes256Gcm, crypto.hash.sha2.Sha384), CHACHA20_POLY1305_SHA256: ApplicationCipherT(crypto.aead.chacha_poly.ChaCha20Poly1305, crypto.hash.sha2.Sha256), - AEGIS_256_SHA384: ApplicationCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha384), + AEGIS_256_SHA512: ApplicationCipherT(crypto.aead.aegis.Aegis256, crypto.hash.sha2.Sha512), AEGIS_128L_SHA256: ApplicationCipherT(crypto.aead.aegis.Aegis128L, crypto.hash.sha2.Sha256), }; diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index af564a1e52..489b3e3a44 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -355,7 +355,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In inline .AES_128_GCM_SHA256, .AES_256_GCM_SHA384, .CHACHA20_POLY1305_SHA256, - .AEGIS_256_SHA384, + .AEGIS_256_SHA512, .AEGIS_128L_SHA256, => |tag| { const P = std.meta.TagPayloadByName(tls.HandshakeCipher, @tagName(tag)); @@ -569,7 +569,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In try hsd.ensure(sig_len); const encoded_sig = hsd.slice(sig_len); const max_digest_len = 64; - var verify_buffer = + var verify_buffer: [64 + 34 + max_digest_len]u8 = ([1]u8{0x20} ** 64) ++ "TLS 1.3, server CertificateVerify\x00".* ++ @as([max_digest_len]u8, undefined); @@ -1406,7 +1406,7 @@ fn limitVecs(iovecs: []std.os.iovec, len: usize) []std.os.iovec { const cipher_suites = if (crypto.core.aes.has_hardware_support) enum_array(tls.CipherSuite, &.{ .AEGIS_128L_SHA256, - .AEGIS_256_SHA384, + .AEGIS_256_SHA512, .AES_128_GCM_SHA256, .AES_256_GCM_SHA384, .CHACHA20_POLY1305_SHA256, @@ -1415,7 +1415,7 @@ else enum_array(tls.CipherSuite, &.{ .CHACHA20_POLY1305_SHA256, .AEGIS_128L_SHA256, - .AEGIS_256_SHA384, + .AEGIS_256_SHA512, .AES_128_GCM_SHA256, .AES_256_GCM_SHA384, }); |
