diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-02-04 12:14:06 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-02-04 12:14:06 +0100 |
commit | 04636e11d108f26df4712c62be108d68ba166e0a (patch) | |
tree | c6694a44cc765d3564a5f37502a928475a377fd6 /id/oa/src/main/java/at/gv | |
parent | 9ef2e8fc5a59abcadc71714da371605bc1fdafa5 (diff) | |
download | moa-id-spss-04636e11d108f26df4712c62be108d68ba166e0a.tar.gz moa-id-spss-04636e11d108f26df4712c62be108d68ba166e0a.tar.bz2 moa-id-spss-04636e11d108f26df4712c62be108d68ba166e0a.zip |
* update demoOA layout
* add test keystore
Diffstat (limited to 'id/oa/src/main/java/at/gv')
-rw-r--r-- | id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/BuildMetadata.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/BuildMetadata.java b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/BuildMetadata.java index 4e13a34df..652960bbc 100644 --- a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/BuildMetadata.java +++ b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/BuildMetadata.java @@ -48,6 +48,7 @@ import org.opensaml.common.xml.SAMLConstants; import org.opensaml.saml2.core.NameIDType; import org.opensaml.saml2.metadata.AssertionConsumerService; import org.opensaml.saml2.metadata.AttributeConsumingService; +import org.opensaml.saml2.metadata.EncryptionMethod; import org.opensaml.saml2.metadata.EntitiesDescriptor; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.saml2.metadata.KeyDescriptor; @@ -55,6 +56,9 @@ import org.opensaml.saml2.metadata.LocalizedString; import org.opensaml.saml2.metadata.NameIDFormat; import org.opensaml.saml2.metadata.SPSSODescriptor; import org.opensaml.saml2.metadata.ServiceName; +import org.opensaml.saml2.metadata.impl.EncryptionMethodBuilder; +import org.opensaml.xml.encryption.EncryptionConstants; +import org.opensaml.xml.encryption.OAEPparams; import org.opensaml.xml.io.Marshaller; import org.opensaml.xml.security.credential.Credential; import org.opensaml.xml.security.credential.UsageType; @@ -187,7 +191,17 @@ public class BuildMetadata extends HttpServlet { KeyDescriptor encryKeyDescriptor = SAML2Utils .createSAMLObject(KeyDescriptor.class); encryKeyDescriptor.setUse(UsageType.ENCRYPTION); - encryKeyDescriptor.setKeyInfo(keyInfoGenerator.generate(authEncCredential)); + encryKeyDescriptor.setKeyInfo(keyInfoGenerator.generate(authEncCredential)); + + //set encryption methode +// EncryptionMethod encMethode = SAML2Utils.createSAMLObject(EncryptionMethod.class); +// encMethode.setAlgorithm(EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128_GCM); +// encryKeyDescriptor.getEncryptionMethods().add(encMethode); +// +// EncryptionMethod keyencMethode = SAML2Utils.createSAMLObject(EncryptionMethod.class); +// keyencMethode.setAlgorithm(EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP); +// encryKeyDescriptor.getEncryptionMethods().add(keyencMethode); + spSSODescriptor.getKeyDescriptors().add(encryKeyDescriptor); } else { |