# std.crypto.tls: use a Decoder abstraction · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0fb78b15aad74498d7f36785d5618edca7e83508)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0fb78b15aad74498d7f36785d5618edca7e83508

Requested commit: 0fb78b15aad74498d7f36785d5618edca7e83508

Commit: 0fb78b15aad74498d7f36785d5618edca7e83508

Tree: b337ad0fdfbe975ff59d44beda2eac02a26e40a4

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.crypto.tls: use a Decoder abstraction

This commit introduces tls.Decoder and then uses it in tls.Client. The
purpose is to make it difficult to introduce vulnerabilities in the
parsing code. With this abstraction in place, bugs in the TLS
implementation will trip checks in the decoder, regardless of the actual
length of packets sent by the other party, so that we can have
confidence when using ReleaseFast builds.

```

## Parents

- [341e68ff8fb83a146f6000b2214c1eae668e9667](https://git.cafe/gitcafe/zig/commit/341e68ff8fb83a146f6000b2214c1eae668e9667?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0fb78b15aad74498d7f36785d5618edca7e83508?format=markdown)
