app = $app; } public function getCert() { $this->app->response()->header('Content-Type', 'text/plain'); readfile(__DIR__ . '/../config/qz/cert.pem'); } public function getSign(string $req) { $privateKey = openssl_get_privatekey(file_get_contents(__DIR__ . '/../config/qz/key.pem')); $signature = null; openssl_sign($req, $signature, $privateKey); $this->app->response()->header('Content-Type', 'text/plain'); if ($signature) { echo base64_encode($signature); } else echo '