2016-10-07 65 views
0

我們使用下面提供在GitHub上的鏈接的DocuSign SOAP PHP SDK:PHP Open_SSL發佈的DocuSign SOAP調用

https://github.com/docusign/docusign-soap-sdk/tree/master/PHP

現在的DocuSign確實有一種方法使用X.509證書籤署API調用,問題是當我們分析我們的PEM文件時,它拋出: 「openssl_sign():提供關鍵PARAM不能被強制轉換爲私有密鑰」

具體文件:

https://github.com/docusign/docusign-soap-sdk/blob/master/PHP/DocuSignSample/api/APIService.php

從行號2236到2247是我們必須通過我們的PEM文件去除評論後才能正常工作的地方。但我們不斷收到一個錯誤「openssl_sign():提供的關鍵參數不能強制爲私鑰」

我們嘗試聯繫Docusign團隊,他們說PHP是錯誤的,但我們使用的版本和庫他們'已經提到。任何幫助都會很棒。

回答

0

您的代碼似乎缺少加載密鑰的行。

/* load the private key from file - last arg is bool if key in file (TRUE) or is string (FALSE) */ 
$objKey->loadKey('filename_of_private_key.pem', true);