您好我正在将应用移植到opensaml3并遇到以下问题:
InitializationService.initialize();
...
Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(qName);
我已经通过initialize函数替换了opensaml2和之前的DefaultBootstrap。仍然工厂将我作为编组员返回null。 知道这里出了什么问题吗?
这是初始化进度的输出:
[main] INFO org.opensaml.core.config.InitializationService - Initializing OpenSAML using the Java Services API
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmlenc#ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160
[main] INFO org.opensaml.xmlsec.algorithm.AlgorithmRegistry - Algorithm failed runtime support check, will not be usable: http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160
答案 0 :(得分:2)
我想你正在使用opensaml v3 所以您应该使用XMLObjectProviderRegistrySupport类创建UnmarshallerFactory对象,就像它完美地工作一样
UnmarshallerFactory umFactory=XMLObjectProviderRegistrySupport.getUnmarshallerFactory();
Unmarshaller unmarshaller=umFactory.getUnmarshaller(element);
答案 1 :(得分:1)
此错误是由于您使用的JCE实现中缺少算法支持。即使您使用BouncyCastle,也似乎不支持某些算法。除非您使用这些算法,否则无需担心。将JCE无限强度管辖权政策罐子安装到jre将解决此问题 请参阅:Decrypting encrypted assertion using SAML 2.0 in java using OpenSAML。