Showing posts with label keytool -import. Show all posts
Showing posts with label keytool -import. Show all posts

Sunday, April 18, 2021

Java + HTTPS: Unable to Find Valid Certification Path to Requested Target

https://myshittycode.com/2015/12/17/java-https-unable-to-find-valid-certification-path-to-requested-target-2/

https://www.baeldung.com/java-import-cer-certificate-into-keystore

https://stackoverflow.com/questions/43188589/what-is-the-difference-between-keytool-commands-import-and-importcert/43188724


From this documentation keytool - Key and Certificate Management Tool, the Changes section at the end of the page says :

Renamed commands:

-import, renamed to -importcert


The keytool has many options but the one we're interested in is importcert which is as straightforward as its name. Since there are usually different entries inside a KeyStore, we'll have to use the alias argument to assign it a unique name:

> keytool -importcert -alias baeldung_public_cert -file baeldung.cer -keystore sample_keystore
> Enter keystore password:
...
> Trust this certificate? [no]:  y
> Certificate was added to keystore

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass