Play auto test with spam issues in java java

I am trying to configure Jenkins CI using a Play plugin that uses autotest to run an application.

The problem is that I also have SSL, but there is no corresponding key / certificate in the firephoque java test browser.

I originally created a key / certificate pair with OpenSSL, but now you need to figure out how to import these keys into the default global Java key store (presumably in $ HOME / .keystore).

I tried these resources in a different order to no avail:

The original google group thread that I started with: http://bit.ly/yZBezu

http://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html

http://www.agentbob.info/agentbob/79-AB.html

http://docs.oracle.com/javase/1.3/docs/tooldocs/win32/keytool.html

I can start the application via SSL when the player selects the location of the keystore from the entry in application.conf, but when the autotest starts the firephoque browser, I get:

The application does not start. There are errors: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 

I would like to be directed to the side in a brief way to do this, my brain is fried with visions of DER and PEM and fun keytool right now, I can’t think straight.

The ultimate goal is a self-signed certificate that will be checked under play auto-test , as well as any other ways to launch the application.

There were different combinations in my application.conf file:

 # SSL - localhost default # original way worked fine before auto-test came into play (so to speak :)) # certificate.key.file=conf/play_host.key # certificate.file=conf/play_host.crt # Keystore ssl.KeyManagerFactory.algorithm=SunX509 trustmanager.algorithm=JKS keystore.password=passw0rd keystore.file=conf/keystore.jks https.port=9443 

UPDATE Exit conf / keystore.jks:

 # keytool -list -keystore keystore.jks Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 1 entry localhost, Jan 31, 2012, PrivateKeyEntry, Certificate fingerprint (MD5): 36:EF:63:4E:53:23:18:22:13:8C:2C:DB:F1:72:2C:93 

But this file is not accessible by the browser that runs inside the autotest, it is firephoque, which is a java application that scans the default keystore - made a few more digits and started searching in

/Library/Java/Home/lib/security/

which symbolically refers to

/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security

to find a place where any application can find the keystore. But I still get the same result if I put another keystore in the security folder above.

UPDATE 2: also tried

play auto-test -Xmx1g -Djavax.net.ssl.trustStore=/path/to/keystore.jks

but I'm not sure I'm doing it right. How can I run an autotest to search for a keystore in an explicit location?

+4
source share
2 answers

Not elegant, but with a game of 1.2.5 on the horizon, it’s not difficult to pay 1.2.4 to make it work.

https://github.com/playframework/play/commit/52f3c165cba1ea62e91a6c26ed62979b90da99c

Thanks dertoni.

+2
source

Assuming you followed the steps from the following link, your keystore should contain the correct information.

http://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-using-java-keytool.html

Do you know that your application collects a keystore?
Can you provide the full path to the location of the keystore file (e.g. keystore.file = / home / some_user / conf / keystore.jks)?
Also, can you send the keystore output?

+1
source

Source: https://habr.com/ru/post/1394097/


All Articles