Posted on 16 Aug 2022, this text provides information on QA/Testing related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
The following is the piece of code using which I get signature, digest value, certificate chain. But when I populate the values and submit the SOAP message I get a Digital Signature Invalid Error. But I verified that the signature is valid.
Code to extract the details:
I face issue with getting certification path and signature from pfx file. Can you share the code which gets them, I have the following piece of code to get them. When I use the signature and certification path obtained through below code , I always get Invalid Digital signature.
publicvoid getCertificateDetails(){String aliasName="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";// not posted heretry{char[] passwd = KEY_STORE_PASSWORD.toCharArray();
keyStore =KeyStore.getInstance("PKCS12","SunJSSE");FileInputStream fis =newFileInputStream("path to pfx file");
keyStore.load(fis, passwd);
fis.close();Enumeration aliases;Certificate[] cc = keyStore.getCertificateChain(aliasName);
X509Certificate certificate1 =(X509Certificate) cc[0];System.out.println("signo algo:"+certificate1.getSigAlgName());// get the value as SHA256withRSAPrivateKey pKey =(PrivateKey)keyStore.getKey("xxxxxxxxxxxxxxxxxxxxxxxxx", passwd);
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
2 years ago
I have a SOAP message like
After generating the java source code from WSDL, for Auth, I am setting value like this. (all the below 4 fields are string datatype)
The following is the piece of code using which I get signature, digest value, certificate chain. But when I populate the values and submit the SOAP message I get a Digital Signature Invalid Error. But I verified that the signature is valid.
Code to extract the details:
I face issue with getting certification path and signature from pfx file. Can you share the code which gets them, I have the following piece of code to get them. When I use the signature and certification path obtained through below code , I always get Invalid Digital signature.