}
nsContext.addEncryptionNS();
nsContext.addExc14NS();
nsContext.addSAMLNS();
nsContext.addSignatureNS();
nsContext.addWSSNS();
// Get the service certificate
final X509Certificate serCert = getServiceCertificate(callbackHandler, stsConfig.getTrustSPMetadata(appliesTo), appliesTo);
// Create the KeyInfo for SubjectConfirmation
final KeyInfo keyInfo = createKeyInfo(keyType, serCert, context);