-
Notifications
You must be signed in to change notification settings - Fork 160
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
Use crypto.Signer whenever possible #681
base: master
Are you sure you want to change the base?
Conversation
7e51e49
to
52dd0c5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #681 +/- ##
==========================================
- Coverage 78.27% 78.11% -0.16%
==========================================
Files 101 101
Lines 6567 6588 +21
==========================================
+ Hits 5140 5146 +6
- Misses 1057 1067 +10
- Partials 370 375 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
LGTM @hoihochan! Would it be possible to fix the API breaks? Maybe leave the old functions?
|
I could, but they look like internal functions that is not shared in the public documentation so let me know. |
Someone could be using them. I believe Can't really know for sure. We can't break API without a major bump. I think we can avoid that here though! |
For certificate-based authentication, it is possible that the private key resides in hardware such as Trusted Platform Module (TPM) and the only way in Golang to access it via the crypto.Signer interface. Any code paths that deal with a private key should use the crypto.Signer interface which comes with a function called Public() and it can be used to determine the type of key used. Fixes pion#524
52dd0c5
to
cff130f
Compare
Hi, any other feedbacks? I have updated the PR. |
For certificate-based authentication, it is possible that the private key resides in hardware such as Trusted Platform Module (TPM) and the only way in Golang to access it via the crypto.Signer interface.
Any code paths that deal with a private key should use the crypto.Signer interface which comes with a function called Public() and it can be used to determine the type of key used.
Fixes #524