Hi Jhan
You may start from here:
public String getSecurityInfo(MessageContext ctx) {
StringBuffer sb = new StringBuffer ();
Vector results = (Vector)
ctx.getProperty(WSHandlerConstants.RECV_RESULTS);
if (null != results) {
for (int i = 0; i < results.size(); i++) {
WSHandlerResult hResult = (WSHandlerResult) results.get(i);
Vector hResults = hResult.getResults();
for (int j = 0; j < hResults.size(); j++) {
WSSecurityEngineResult eResult = (WSSecurityEngineResult)
hResults
.get(j);
if (eResult.getAction() == WSConstants.TS) {
sb.append("Message has timestamp.").append("\n");
if (null != eResult.getPrincipal())
sb.append("\tPrincipal name:
").append(eResult.getPrincipal().getName()).append("\n");
else
sb.append("\tPrincipal is null\n");
} else if (eResult.getAction() == WSConstants.SIGN) {
sb.append("Message has signature.").append("\n");
if (null != eResult.getPrincipal()) {
sb.append("\tPrincipal name:
").append(eResult.getPrincipal().getName()).append("\n");
sb.append("\tSubjectDN:
").append(eResult.getCertificate().getSubjectDN().getName()).append("\n");
sb.append("\tIssuer:
").append(eResult.getCertificate().getIssuerDN().getName()).append("\n");
} else
sb.append("\tPrincipal is null\n");
} else {
sb.append("eResult.getAction():
").append(eResult.getAction()).append("\n");
}
}
}
}
return sb.toString();
}
Regards,
Ali Sadik Kumlali
----- Original Message ----
From: Jhan Yuler <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, November 15, 2006 8:40:49 PM
Subject: [Axis2][Rampart] How can I get the digital certificate information?
Hi everybody
I'm using Axis2 with the Rampart module (WS-Security). The business logic in
the skeleton class needs to get some information from the client digital
certificate. Somebody knows how can I do that?
Thanks
Solo conoce el vino bueno, aquel que probó el vino amargo
_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger:
http://messenger.latam.msn.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]