想知道是否有人可以提供帮助,我在一些地方看到了这个错误,但仍然没有解决。当我尝试通过应用内购买验证付款时,我将变量传递到服务器以进行验证,以及应用,但我收到以下错误:
错误:0906D06C:PEM例程:PEM_read_bio:无起始线
我的代码如下。有什么建议吗?
// $public_key is the public key sent from the android app
// $signature and data are also sent via http to the server from the android app which were received from google.
$key = "-----BEGIN PUBLIC KEY-----\n".
chunk_split($public_key, 64,"\n").
'-----END PUBLIC KEY-----';
$key = openssl_get_publickey ( $key );
$signature = base64_decode ( $signature );
$result = openssl_verify ( $signed_data, $signature, $key, OPENSSL_ALGO_SHA1 );