openssl_pkey_get_public
Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Extract public key from certificate and prepare it for use
Alias
openssl_get_publickey
openssl_pkey_get_public
(
OpenSSLAsymmetricKey
|
OpenSSLCertificate
|array|
string $public_key
):
OpenSSLAsymmetricKey
|
false
composer/composer
);
}
$pubkeyid
=
openssl_pkey_get_public
(
$sigFile
);
if (
false
===
$pubkeyid
) {
throw new
\RuntimeException
(
'Failed loading the public key from '
.
$sigFile
);
}
src/Composer/Command/SelfUpdateCommand.php
symfony/var-dumper
$stub
->
cut
= -
1
;
$info
=
openssl_x509_parse
(
$h
,
false
);
$pin
=
openssl_pkey_get_public
(
$h
);
$pin
=
openssl_pkey_get_details
(
$pin
)[
'key'
];
$pin
=
\array_slice
(
explode
(
"\n"
,
$pin
),
1
, -
2
);
$pin
=
base64_decode
(
implode
(
''
,
$pin
));
Caster/ResourceCaster.php