Skip to content

Commit

Permalink
Support external crypto implementations.
Browse files Browse the repository at this point in the history
These changes are needed for the BoringSSL crypto provider (#1488),
which will reside in a separate repository.
  • Loading branch information
nmittler committed Mar 21, 2023
1 parent 93e7269 commit 0123241
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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.
///
/// 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 {
Code(0x100 | u64::from(code))
}
}
Expand Down

0 comments on commit 0123241

Please sign in to comment.