2

我已经使用组件空间 SAML2.0 设置了 IDP

服务提供者也在组件空间 SAML2.0

证书算法:RSASHA256

我们没有服务提供商证书详细信息,因为我们发送没有 AuthRequest 的 SAMLResponse

<IdentityProvider Name="http://localhost/ExampleIdentityProvider"
                Description="Example Identity Provider"
                LocalCertificateFile="Certificates\idp.pfx"
                LocalCertificatePassword="password"/>

<PartnerServiceProviders>
<!-- Web forms example -->
<PartnerServiceProvider Name="abc"
                        Description="Example Service Provider"
                        WantAuthnRequestSigned="false"
                        SignSAMLResponse="true"
                        SignAssertion="false"
                        EncryptAssertion="false"
                        AssertionConsumerServiceUrl="https://abc.xyz/sso/saml/servicerequest"
                        SingleLogoutServiceUrl="http://abc.xyz/sso/saml"
                        PartnerCertificateFile="Certificates\sp.cer"/>

我在我们这边发送断言时收到这些错误。

CryptographicException:指定的算法无效。
SAMLSignatureException:无法生成 XML 签名。

4

1 回答 1

1

如果您使用我们在示例中包含的 idp.pfx 文件,您是否会遇到相同的错误?如果不是,我怀疑您的私钥没有指定正确的加密服务提供商 (CSP) 来支持 SHA-256 签名生成。请参阅以下文章,该文章解释了如何指定正确的 CSP。

http://www.componentspace.com/Forums/1578/SHA256-and-Converting-the-Cryptographic-Service-Provider-Type

于 2016-12-21T20:42:56.963 回答