-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Az 12.1.0 - Az.KeyVault - Import-AzKeyVaultCertificate - Import of .p7b files has been broken #25843
Comments
Hi @nickwb, thanks for reporting this. Tracking this issue now. |
Hi @nickwb,
|
Hi @BethanyZhou, No, we are using public keys/certs only. No private key material. I believe it is considered a merge, because the private key is already in KeyVault, but the signed certificates are not. Our process is:
We started using As an aside, I am interested if it is now possible to import multiple certificates as PEM in a single file? I have a test certificate |
Hi @nickwb, Import-AzKeyVaultCertificate has only supported to merge multiple certificates as PEM in single file now. That's why we raised the PR you mentioned in the description section. Please try to use PEM file to work around this issue. And let me know if this way works for you. We need to discuss with Key Vault team to decide if we need to support p7b file for merge operation. Notice that do not use old Az.KeyVault to work around this issue because the content sent to service is read in wrong way. The certificate should not work even no error is thrown per my understanding. |
Hi @BethanyZhou - yes, we will try with PEM, I will let you know how it goes. I will note that |
Description
Hi @BethanyZhou,
There appears to be a regression in relation to this PR: #25333, and this issue: #24323
Specifically, the Az.KeyVault module previously supported certificate import, via
Import-AzKeyVaultCertificate
, of a PKCS7.p7b
file.However, the new code in
ImportAzureKeyVaultCertificate.GetEnumerableBytes
seems to assumePEM
format, as it is expecting the-----BEGIN CERTIFICATE-----
and-----END CERTIFICATE-----
, which are not present in PKCS7. Instead,-----BEGIN PKCS7-----
and-----END PKCS7-----
are expected.Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: