From d76680a7a240244c9308324ca33cc35efec8963c Mon Sep 17 00:00:00 2001 From: xl Date: Mon, 3 Jun 2024 10:53:51 +0800 Subject: [PATCH] eee --- wx/V3/WxV3PaymentNotify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wx/V3/WxV3PaymentNotify.php b/wx/V3/WxV3PaymentNotify.php index f6638f7..0aec437 100644 --- a/wx/V3/WxV3PaymentNotify.php +++ b/wx/V3/WxV3PaymentNotify.php @@ -111,7 +111,7 @@ class WxV3PaymentNotify extends SmallProgram */ protected function rsaFrom(string $thing, string $type = KEY_TYPE_PRIVATE): OpenSSLAsymmetricKey { - $pkey = (($isPublic = $type === KEY_TYPE_PUBLIC) ? openssl_pkey_get_public(file_get_contents($thing)) : openssl_pkey_get_private(file_get_contents($thing))); + $pkey = (($isPublic = $type === KEY_TYPE_PUBLIC) ? openssl_pkey_get_public('file:/' . $thing) : openssl_pkey_get_private('file:/' . $thing)); if (false === $pkey) { throw new \UnexpectedValueException(sprintf('Cannot load %s from(%s), please take care about the $thing input.', $isPublic ? 'publicKey' : 'privateKey', gettype($thing))); }