platform/tls_quictls: add support for in-memory PEM certificate (QUIC_CERTIFICATE_PEM)#5766
Open
unstabler wants to merge 7 commits intomicrosoft:mainfrom
Open
platform/tls_quictls: add support for in-memory PEM certificate (QUIC_CERTIFICATE_PEM)#5766unstabler wants to merge 7 commits intomicrosoft:mainfrom
QUIC_CERTIFICATE_PEM)#5766unstabler wants to merge 7 commits intomicrosoft:mainfrom
Conversation
Author
|
@microsoft-github-policy-service agree company="team unstablers Inc." |
Contributor
|
Hey thanks for this PR. @anrossi should have the most context on TLS. I also see usage of #ifndef _WIN32 for gating this feature. Let's be careful that this is actually the correct macro given the vast number of platforms MsQuic supports. |
Properly handle `SSL_CTX_add_extra_chain_cert` failures and distinguish EOF from parse error during PEM chain processing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation
I am developing server software for macOS based on MsQuic. Since MsQuic does not currently support using
SecIdentityfrom the macOSSecurity.framework(Keychain) directly, I wanted to avoid the workaround of writing PEM files to a temporary directory just to load them.Although there is existing support for loading PKCS12 from memory, MsQuic failed to read the PKCS12 blob exported via
Security.framework. According to an analysis by an LLM, this issue seems to be caused by the macOS export using legacy encryption algorithms or password enforcement that are not compatible with the current MsQuic/OpenSSL configuration.Changes
Added
QUIC_CERTIFICATE_PEMstructAdded Unit Tests
Notes
original text
왜 필요한가
MsQuic 기반으로 macOS용 서버 소프트웨어를 만들고 있습니다. macOS Keychain에 저장된 서버용 인증서(
SecIdentityfromSecurity.framework)를 MsQuic에서 다이렉트로 사용하지 못하더라도, 적어도 PEM 파일을 임시 디렉토리에 저장하는 짓 만큼은 하고 싶지 않았습니다.PKCS12는 in-memory 로부터 로드하는 기능이 있긴 하지만, Security.framework를 통해 export한 인증서는 어째서인지 읽어들이지 못했습니다. LLM 모델에 따르면, Security.framework에서 export하는 PKCS12 인증서는 password-enforced 되어 있는 것도 있지만, 암호화 알고리즘이 너무 낡아서 그렇다고 하는 것 같습니다.
CHANGES
QUIC_CERTIFICATE_PEMstruct를 추가합니다.NOTE
Testing
Do any existing tests cover this change? Are new tests needed?
Documentation
Is there any documentation impact for this change?