tls_codec: Add function to ensure all bytes have been consumed
@franziskuskiefer ci sta già lavorando.
Dal 16/11/2021.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
While usually more than one object is serialized in a byte buffer, there might be situations where you just expect one object from a byte buffer. In other words, there is currently no counterpart to tls_serialized_detached().
The motivation behind this is that the TLS encoding implicitly guarantees that at least the required number of bytes indicated in the length prefix have been read, but you don't know if any trailing bytes are left after deserializing an object unless you try to deserialize another object or do a manual check.
I would propose something like tls_deserialize_detached() (or whatever other name is more suitable) that takes ownership of the Read and after internally calling tls_deserialize it checks if it can read one more byte and if so, returns an error.
- Lingua principale
- Rust
- Stelle
- 338
- Fork
- 188
- Merge medio
- 4g 6h
- PR unite (30g)
- 15
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustCrypto/formats
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
RustCrypto/formats#2389 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
RustCrypto/formats#2366 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
RustCrypto/formats#2430 · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
RustCrypto/formats#2428 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
RustCrypto/formats#2427 · 1 commento ·
Tutte le issue di RustCrypto/formats
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
taikoxyz/taiko-mono#22168 · 1 commento ·