}
public PrivateKey getPrivateKey(Map context, BigInteger serialNumber, String issuerName)
throws XWSSecurityException {
X500PrivateCredential cred = getPKCredentialsFromLCSubject();
if (cred != null) {
X509Certificate x509Cert = cred.getCertificate();
BigInteger serialNo = x509Cert.getSerialNumber();
//Fix for WSIT issue
X500Principal currentIssuerPrincipal = x509Cert.getIssuerX500Principal();
X500Principal issuerPrincipal = new X500Principal(issuerName);
if (serialNo.equals(serialNumber) &&
currentIssuerPrincipal.equals(issuerPrincipal)) {
return cred.getPrivateKey();
}
}
PrivateKey privateKey = null;