mace-opensaml-users - Signing assertions and HoK
Subject: OpenSAML user discussion
List archive
- From: Massimiliano Masi <>
- To:
- Subject: Signing assertions and HoK
- Date: Thu, 18 Oct 2007 19:32:45 +0200
Hi All,
In this moment, for validating and signing an assertion, I'm using this code:
Credential credential = SecurityHelper.getSimpleCredential(pubkey,servicePrivateKey);
SignatureValidator k = new SignatureValidator(credential);
k.validate(a.getSignature());
and
SignatureBuilder signatureBuilder = (SignatureBuilder) builderFactory.getBuilder(Signature.DEFAULT_ELEMENT_NAME);
Signature assertionSignature = signatureBuilder.buildObject();
assertionSignature.getContentReferences().add(new SAMLObjectContentReference(assertion));
PublicKey servicePublicKey = serviceCertificate.getPublicKey();
BasicCredential credential = SecurityHelper.getSimpleCredential(servicePublicKey, servicePrivateKey);
assertionSignature.setSigningCredential(credential);
assertionSignature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);
assertionSignature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA);
Are there any way to sign and validate objects, instead of the use of the getSimpleCredential() method? Using for example CAs instead of pvt or pub keys.
Thanks,
Massimiliano
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
- Signing assertions and HoK, Massimiliano Masi, 10/18/2007
Archive powered by MHonArc 2.6.16.