2011-04-20 58 views
7

使用makecert我編寫了commade:無法創建主題<'MyCAContainerName'>的鍵

makecert -pe -n "CN=Myauthority" -sr localmachine -ss Root -a sha256 -cy authority -r -sk MyCAContainerName -sky exchange -sp "Microsoft RSA Schannel Cryptographic Provider " -sy 12 -len 2048 certif.cer;

我收到錯誤

Error: Can't create the key of the Subject <'MyCAContainerName'>

在尋求解決方案時,我發現問題出現是因爲我沒有在machineKey文件上授權:(C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys) ,

以下鏈接更好地解釋了我所說的內容;

http://support.microsoft.com/kb/278381

我遵循相同的程序,以便擁有足夠的機器密鑰權限,但問題總是擺出來

回答

5

看來Can't create the key of the subject是一個非常通用的錯誤,但是,接下來之後它可能會提供線索。

雖然它可能是由權限錯誤引起的(例如makecert.exe error: Can't create the key of the subject),但我也看到Can't create the key of the subject ('<some guid>')由於參數不正確而導致的錯誤-sp參數。

在你的情況,Error: Can't create the key of the Subject <'MyCAContainerName'>會讓我想這有什麼不對的命令-sk MyCAContainerName部分,但結果是,如果它是不是具有權限,比它可能是一個不正確的命令參數或組合參數。

+1

謝謝。看來我永遠不會使用'-sp「Microsoft RSA SChannel加密提供程序」-sy 12「,即使此CSP根據[makecert頁面]上這些選項的解釋是有效的(http://msdn.microsoft.com /en-us/library/bfsktky3%28v=vs.110%29.aspx)(即他們在註冊表中。) – 2014-02-13 20:39:21

1

它的後期,但我有解決這個問題。首先執行命令,它會給出錯誤Error: Can't create the key of the Subject <'MyCAContainerName'>。但它會創建一個.pvk文件。 不要刪除它。請重新執行該命令,但是這次從命令中刪除-sk MyCAContainerName。它會創建你的證書。

1

主人,

我跑了同樣的錯誤。我以管理員用戶的身份解決了運行命令提示符問題

MV

0

在我的情況下,C盤沒有足夠的空間。我清除了一些不需要的文件和文件夾,它工作。