if (validateCertificateChain) {
certificates = certs;
}
return certs[0].getSubjectX500Principal();
} else if (publicKey != null) {
return new PublicKeyPrincipal(publicKey);
} else if (ut != null) {
WSUsernameTokenPrincipal principal =
new WSUsernameTokenPrincipal(ut.getName(), ut.isHashed());
principal.setNonce(ut.getNonce());
principal.setPassword(ut.getPassword());