I added certificates to java 6 home through these command
keytool -import -noprompt -trustcacerts -alias postman -file C:\ME\PostmanCer.cer -keystore "C:/Program Files/Java/jdk1.6.0_45/jre/lib/security/cacerts" -storepass changeit
and check the whole list to ensure that is added successfully
keytool -list -v -keystore "C:/Program Files/Java/jdk1.6.0_45/jre/lib/security/cacerts"
and it's added
Alias name: postman
Creation date: May 6, 2022
Entry type: trustedCertEntry
Owner: CN=postman-echo.com
Issuer: CN=Amazon, OU=Server CA 1B, O=Amazon, C=US
Serial number: 1d28e731ad13c59327f0460b6ab6021
Valid from: Thu Mar 10 02:00:00 EET 2022 until: Sun Apr 09 01:59:59 EET 2023
Certificate fingerprints:
MD5: CE:FA:B7:E0:E3:4F:CB:30:0F:D7:F0:18:04:BE:A0:4C
SHA1: 99:C3:89:D6:54:04:82:A3:FD:E2:FF:8E:9D:C0:78:73:08:30:F0:68
Signature algorithm name: SHA256withRSA
Version: 3
try to call rest postman service with the code below
it works fine in Java 8 but java 6 returns this error.
error returns in java 6
`` public class Test { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub String userName = "postman"; String password = "password";
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setDoInput(true);
} ``
I added certificates to java 6 home through these command keytool -import -noprompt -trustcacerts -alias postman -file C:\ME\PostmanCer.cer -keystore "C:/Program Files/Java/jdk1.6.0_45/jre/lib/security/cacerts" -storepass changeit
and check the whole list to ensure that is added successfully keytool -list -v -keystore "C:/Program Files/Java/jdk1.6.0_45/jre/lib/security/cacerts"
and it's added
Alias name: postman Creation date: May 6, 2022 Entry type: trustedCertEntry
Owner: CN=postman-echo.com Issuer: CN=Amazon, OU=Server CA 1B, O=Amazon, C=US Serial number: 1d28e731ad13c59327f0460b6ab6021 Valid from: Thu Mar 10 02:00:00 EET 2022 until: Sun Apr 09 01:59:59 EET 2023 Certificate fingerprints: MD5: CE:FA:B7:E0:E3:4F:CB:30:0F:D7:F0:18:04:BE:A0:4C SHA1: 99:C3:89:D6:54:04:82:A3:FD:E2:FF:8E:9D:C0:78:73:08:30:F0:68 Signature algorithm name: SHA256withRSA Version: 3
Extensions:
1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [ DigitalSignature Key_Encipherment ]
2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[ CA:false PathLen: undefined ]
3: ObjectId: 1.3.6.1.4.1.11129.2.4.2 Criticality=false
4: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
AuthorityInfoAccess [ [ accessMethod: 1.3.6.1.5.5.7.48.1 accessLocation: URIName: http://ocsp.sca1b.amazontrust.com, accessMethod: 1.3.6.1.5.5.7.48.2 accessLocation: URIName: http://crt.sca1b.amazontrust.com/sca1b.crt] ]
5: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [ KeyIdentifier [ 0000: B2 AF 0D E8 62 E5 B6 D7 D1 28 6C 2E 75 BD 02 75 ....b....(l.u..u 0010: 3D F7 D1 B0 =... ] ]
6: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [ DNSName: postman-echo.com DNSName: *.postman-echo.com ]
7: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [ [DistributionPoint: [URIName: http://crl.sca1b.amazontrust.com/sca1b-1.crl] ]]
8: ObjectId: 2.5.29.32 Criticality=false
CertificatePolicies [ [CertificatePolicyId: [2.23.140.1.2.1] [] ] ]
9: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 59 A4 66 06 52 A0 7B 95 92 3C A3 94 07 27 96 74 Y.f.R....<...'.t 0010: 5B F9 3D D0 [.=. ]
]
10: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [ serverAuth clientAuth ]
how can i solve this issue.