2013-07-25 13 views
1

創建x509.v3自簽名的證書我寫的應用程序生成SAML2令牌在SSO使用。它使用System.Security.Cryptography.X509Certificates簽署XML並對斷言加密。對SAML簽名和加密,Windows 8的R2

我們會買一個證書我們的生產環境,但現在我需要我們用自己創建的證書整合服務器來測試。我使用MakeCert創建了一個,並將其加載到My Store中的LocalMachine位置。這工作時,我本地主機,但在遠程訪問提供了以下錯誤:

The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation. 

    System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) +369 
    System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) +151 
    System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair() +85 
    System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize) +280 
    System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() +468 
.... 

我已經下載winhttpcertcfg,並用它來給用於應用程序池的網站(SharePoint2010)的域帳戶,併爲網絡服務,獲得證書,但這沒有效果。

任何人都可以點我解釋如何正確地創建和在Windows 8中實現對XML簽名和加密自簽名證書的資源?

回答