-
Notifications
You must be signed in to change notification settings - Fork 582
Support pkcs12 certificates in schannel #2580
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
base: main
Are you sure you want to change the base?
Conversation
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.
If you merge main, I believe the clog change should disappear.
HCERTSTORE CertStore, | ||
PCCERT_CONTEXT* CertContext |
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.
SAL annotations please
src/platform/cert_capi.c
Outdated
if (!CryptQueryObject( | ||
ObjectType, | ||
CredConfig->CertificatePkcs12->Asn1Blob, | ||
CERT_QUERY_CONTENT_FLAG_PFX, | ||
CERT_QUERY_FORMAT_FLAG_ALL, | ||
0, | ||
&MsgAndCertEncodingType, | ||
&ContentType, | ||
&FormatType, | ||
&CertStore, | ||
&Msg, | ||
&CertContext)) { |
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.
if (!CryptQueryObject( | |
ObjectType, | |
CredConfig->CertificatePkcs12->Asn1Blob, | |
CERT_QUERY_CONTENT_FLAG_PFX, | |
CERT_QUERY_FORMAT_FLAG_ALL, | |
0, | |
&MsgAndCertEncodingType, | |
&ContentType, | |
&FormatType, | |
&CertStore, | |
&Msg, | |
&CertContext)) { | |
if (!CryptQueryObject( | |
ObjectType, | |
CredConfig->CertificatePkcs12->Asn1Blob, | |
CERT_QUERY_CONTENT_FLAG_PFX, | |
CERT_QUERY_FORMAT_FLAG_ALL, | |
0, | |
&MsgAndCertEncodingType, | |
&ContentType, | |
&FormatType, | |
&CertStore, | |
&Msg, | |
&CertContext)) { |
goto Exit; | ||
} | ||
|
||
// Find the first cert with a private key. If none then take the first cert |
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.
// Find the first cert with a private key. If none then take the first cert | |
// | |
// Find the first cert with a private key. If none then take the first cert | |
// |
} | ||
|
||
if (CertContext == NULL) { | ||
// TODO Maybe better 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.
Probably, and plus, add an error log.
src/platform/tls_schannel.c
Outdated
case QUIC_CREDENTIAL_TYPE_CERTIFICATE_FILE_PROTECTED: | ||
case QUIC_CREDENTIAL_TYPE_CERTIFICATE_PKCS12: |
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 a bit confused why these should be NOT_SUPPORTED. Is this supposed to kernel specific?
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.
Yes this chain is kernel specific. Which will never support these 2 methods, at least in the current state.
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.
Wait actually nevermind. I messed up here.
This change is dependent on #2606 which requires implementing a PCKS12 writer in the selfsigned certificate generating code. |
Description
Part of #1453. Adds support for loading PKCS12 certificates in schannel
Testing
Pkcs12 tests are enabled on schannel
Documentation
No