-
Notifications
You must be signed in to change notification settings - Fork 718
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
fix: refactor rust bindings fingerprint methods #4474
Conversation
f7b5492
to
202cc71
Compare
use super::ClientHello; | ||
|
||
#[derive(Copy, Clone)] | ||
pub enum FingerprintType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the scope of this PR, but we should probably mark this non-exhaustive
before we do the actual 0.2
release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already did the 0.2 release :) But we can mark it now, since fingerprinting is unstable anyway.
let message_head = self.raw_message().map_err(|_| fmt::Error)?; | ||
let mut hash = Vec::new(); | ||
self.fingerprint_hash(FingerprintType::JA3, &mut hash) | ||
.map_err(|_| fmt::Error)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm disappointed that you couldn't figure out a way to keep this, but we can always add it back later.
Resolved issues:
N/A
Description of changes:
The feature flag unstable-fingerprint was tagged to the client_hello method, which means that no one could retrieve the client hello or any of the getters on it without turning on the unstable-fingerprint flag. I uncoupled the client hello methods from the fingerprint feature by moving the fingerprint-specific code to a module.
Call-outs:
Testing:
Includes test
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.