Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech QA/Testing 2 years ago
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.
Turn Your Knowledge into Earnings.
I have a SOAP message like
<soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:v = "http://www.something.com"> <soapenv:Header/> <soapenv:Body> <v:Auth> <v:userID>xxxxxxxxxxv:userID> <v:password>xxxxxxxxxxv:password> <v:certChain>xxxxxxxxxxv:certChain> <v:signature>xxxxxxxxxxv:signature> v:Auth> soapenv:Body> soapenv:Envelope>
After generating the java source code from WSDL, for Auth, I am setting value like this. (all the below 4 fields are string datatype)
Auth authInfo = new Auth(); authInfo.setUserID(userId); authInfo.setPassword(password); authInfo.setCertChain(""); authInfo.setSignature("");
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.
public void getCertificateDetails(){ String aliasName="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // not posted here try{ char[] passwd = KEY_STORE_PASSWORD.toCharArray(); keyStore = KeyStore.getInstance("PKCS12","SunJSSE"); FileInputStream fis = new FileInputStream("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 SHA256withRSA PrivateKey pKey = (PrivateKey)keyStore.getKey("xxxxxxxxxxxxxxxxxxxxxxxxx", passwd); REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
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.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.