Home  >  Article  >  Backend Development  >  php5.38 openssl_get_privatekey()这个方法不能用 求大神帮助

php5.38 openssl_get_privatekey()这个方法不能用 求大神帮助

不言
不言Original
2018-05-25 16:39:381839browse

$priv_key = file_get_contents("pcarduser-sandbox-fzh.pem");  	
$pkeyid = openssl_get_privatekey($priv_key);//运行到这里就报错
Fatal error: Call to undefined function openssl_get_privatekey()	
openssl_sign($kq_all_para, $signMsg, $pkeyid,OPENSSL_ALGO_SHA1);// compute signature	
openssl_free_key($pkeyid);	
// free the key from memory	
$kq_sign_msg = base64_encode($signMsg);

求大神 !   帮帮忙啊!

回复讨论(解决方案)

openssl_pkey_get_private().具php.net上是说这个方法是一个别名,尝试下这个方法.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn