Skip to content
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

Import-Certificate #520

Open
Fareroo7 opened this issue Feb 17, 2023 · 2 comments
Open

Import-Certificate #520

Fareroo7 opened this issue Feb 17, 2023 · 2 comments

Comments

@Fareroo7
Copy link

I want to use self-signed certificates, like described here: HOWTO

When I try to run this command:

Import-Certificate -FilePath C:\Run\my\certs\tls.crt -CertStoreLocation Cert:\LocalMachine\My\

the following error occurs:

Import-Certificate : Error HRESULT E_FAIL has been returned from a call to a COM component.
At line:1 char:1
+ Import-Certificate -FilePath C:\Run\my\certs\tls.crt -CertStoreLocati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Certificate], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.CertificateServices.Commands.ImportCertificateCommand
@freddydk
Copy link
Contributor

Using BcContainerHelper and the -useSSL switch on New-BcContainer will give you a self-signed certificate.

@rdebath
Copy link

rdebath commented Mar 8, 2024

@freddydk OP's link doesn't point to an actual "self-signed" certificate despite their description.
Instead it points to using something like a "domain signed" certificate or some other private CA.

@Fareroo7 We'd need more information than just that command.

But if you're following that HowTO I had to include -useSSL in addition to the script; it's needed to call the script after all.
And you need to load a PFX into \My because the service tier needs access to the private key (which is likely protected by a password).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants