Can I create a self-signed certificate in Java that is automatically trusted by web browsers?

I created a self-signed certificate for my Java application using keytool. However, when I go to the site in the browser, it always appears with a warning - saying that this site does not own the certificate - is there a way to sign / process the certificate myself so that I do not receive these warnings in the browser? Both servers and the browser are located on the same host, and I go to the site using " http: // localhost / ". I don’t want to add an exception to the browser, because I have tests that run on a large farm, so I excessively add exceptions to all browsers on all build machines.

+5
source share
4 answers

You can also configure a self-signed certificate authority (CA) using OpenSSL or perhaps your Java tool. You can then use this CA to sign a number of server certificates.

You still have to manually trust the self-signed CAs to all clients that access your test servers, but at least you need to trust only one root CA, not a bunch of separate self-signed server certificates.

Another option is to check CAcert .

+4
source

No, you can’t. You may also ask: "How can I make a fake certificate for hsbc.com?"

:

  • ( , , ), .
  • , .

, - , ?

+19

localhost test.textbox.com? FQDN test.textbox.com, , , , . , IP- (localhost) , , . ?

+1

"localhost". , URL.

- , , .

+1

All Articles