Commit 09f65bff by Mohammad Izzat Johari

refactor

parent 4ec1d842
...@@ -340,7 +340,7 @@ class Pkcs11Command ...@@ -340,7 +340,7 @@ class Pkcs11Command
} }
$key_pem = $storagePath . '/' . Str::beforeLast($filename, '.') . '.pem'; $key_pem = $storagePath . '/' . Str::beforeLast($filename, '.') . '.pem';
$extract_key = '"C:\Program Files\OpenSC Project\OpenSC\tools\pkcs11-tool.exe" --module "C:\Program Files\Utimaco\SecurityServer\Lib\cs_pkcs11_R3.dll" --slot 1 --read-object --type pubkey --id 01 > "'.$key_der.'"'; $extract_key = '"' . $this->pkcs11_tool . '" --module "' . $this->module . '" --slot ' . $this->slotId .' --read-object --type pubkey --id 01 > "'.$key_der.'"';
$this->runShellCommand($extract_key, 'Failed to extract key in HSM'); $this->runShellCommand($extract_key, 'Failed to extract key in HSM');
$convert_key = 'openssl rsa -pubin -inform DER -in "'.$key_der.'" -outform PEM -out "'.$key_pem.'"'; $convert_key = 'openssl rsa -pubin -inform DER -in "'.$key_der.'" -outform PEM -out "'.$key_pem.'"';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment