if ((Constants.GSI_SEC_MSG.equals(this.mechanism)) &&
(Constants.ENCRYPTION.equals(this.protection))) {
Subject subject = new Subject();
X509Certificate serverCert =
CertUtil.loadCertificate(publicKeyFilename);
EncryptionCredentials encryptionCreds =
new EncryptionCredentials(new X509Certificate[]
{ serverCert });
subject.getPublicCredentials().add(encryptionCreds);
stub._setProperty(Constants.PEER_SUBJECT, subject);
}