Skip to content

Commit

Permalink
openssl-open.xml Fix the error and improve CS (#3953)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalferov authored Oct 29, 2024
1 parent 7ce9e16 commit 730fd5c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions reference/openssl/functions/openssl-open.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,20 @@
<programlisting role="php">
<![CDATA[
<?php
// $sealed, $env_key and $iv are assumed to contain the sealed data, our
// envelope key and IV. All given to us by the sealer.
// fetch private key from file located in private_key.pem
$pkey = openssl_get_privatekey("file://private_key.pem);
// Fetch private key from file located in private_key.pem
$pkey = openssl_get_privatekey("file://private_key.pem");
// decrypt the data and store it in $open
// Decrypt the data and store it in $open
if (openssl_open($sealed, $open, $env_key, $pkey, 'AES256', $iv)) {
echo "here is the opened data: ", $open;
echo "Here is the opened data: ", $open;
} else {
echo "failed to open data";
echo "Failed to open data";
}
?>
]]>
</programlisting>
Expand Down

0 comments on commit 730fd5c

Please sign in to comment.