Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support external crypto implementations. #1496

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion quinn-proto/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ pub trait Session: Send + 'static {
///
/// This should be called with the contents of `CRYPTO` frames. If it returns `Ok`, the
/// caller should call `write_handshake()` to check if the crypto protocol has anything
/// to send to the peer.
/// to send to the peer. This method will only return `true` the first time that
/// handshake data is available. Future calls will always return false.
Ralith marked this conversation as resolved.
Show resolved Hide resolved
///
/// On success, returns `true` iff `self.handshake_data()` has been populated.
fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, TransportError>;
Expand Down
2 changes: 1 addition & 1 deletion quinn-proto/src/transport_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub struct Code(u64);

impl Code {
/// Create QUIC error code from TLS alert code
pub(crate) fn crypto(code: u8) -> Self {
pub fn crypto(code: u8) -> Self {
djc marked this conversation as resolved.
Show resolved Hide resolved
Code(0x100 | u64::from(code))
}
}
Expand Down