Repository navigation
Fix import pem - #248
Merged
Merged
Fix import pem#248
Conversation
added 2 commits
September 1, 2026 18:07
The frontend sends the API during CA import never a NULL as CRL, but if no CRL is specified an empty string. During import VaulTLS only checks if the CRL field is set at all and not if string is empty. It then tries to extract a CRL number which fails and logs warning. Otherwise import works and does not cause issues. Add check for empty string to stop wasting cycles and print unnessary warning.
VaulTLS does not decode a PEM-encoded private key to DER when storing as a CA object. When trying to use the imported CA to create a certificate it fails, because rcgen can not read the private key. Add decoding of PEM private key to DER, same approach used for cert file. Fixes: #239
Owner
Author
|
Verified fix thanks to tester |
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.
Importing a (PEM encoded) CA currently has two issues. It does not check if provided CRL string is empty (is the case if no CRL is specified in frontend) and does not decode PEM-encoded private key to DER, meaning PEM-encoded imported CAs can not be used.