$passphrase = 'test';
$this->jwtCertificateGenerator->
generate( $this->privatePath,
$this->publicPath,
$passphrase );
static::
assertFileExists($this->privatePath
);
static::
assertFileExists($this->publicPath
);
static::
assertFileIsReadable($this->privatePath
);
static::
assertFileIsReadable($this->publicPath
);
$data = 'test data';
/** @var string $privateCertificate */
$privateCertificate =
file_get_contents($this->privatePath
);
/** @var \OpenSSLAsymmetricKey $privateKey */
$privateKey =
openssl_pkey_get_private($privateCertificate,
$passphrase);
openssl_sign($data,
$signature,
$privateKey);