by pass invalid/self signed certificate in java/glassfish – linux
The following would be handy if one wants to by pass the self signed certificate in java – for app server glassfish.
1. Go to browser and paste the url on it. Let’s assume we are using https://www.sometestcert.com/thispage.asmx
2. On the page double click the lock image [ on firefox you can get it on the right bottom corner ]. Make sure you have https not http to get that lock thing
3. Assuming you are on firefox, goto security -> view certificate -> details-> and Click Export and save it as certificate.pem – choosing x.509 certificate with chain is a good one.
4. then add the key to the glassfish’s keystore.. – say on local machine the default location for key store would be
/usr/local/glassfish/domains/domain1/config.
5. Once you go to the appropriate directory, being on terminalcd , type the following.
keytool -import -alias “sometestcert.com” -keystore cacerts.jks -file /location/to/certificate.pem
6. This time it might ask you a password, if you have specific password for the cacerts then insert it, if not the default would be changeit
7. type yes when asked if you trust the site – of course
enjoy certicating..
See how you would solve these known algorithm problems
Check if there are three numbers a, b, c giving a total T from array AString Ordered Permutation Algorithm Problem
Kadane’s algorithm in C – Dynamic Programming
Get maximum occurring character
Changing decimal number to its binary equivalent
Find K Complementary numbers from array Java implementation
Implementing tokenizer and adding tokens to the linked list
find longest word in the sentence
Check if two strings are anagrams or not
Find longest palindrom from sequence of characters