Skip to content
Snippets Groups Projects
Verified Commit e6d78277 authored by Simon's avatar Simon
Browse files

some fixes in openssl signature process

parent 98fd2ca8
No related branches found
No related tags found
No related merge requests found
Pipeline #1787 passed
......@@ -106,8 +106,9 @@ $jwt_payload = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode(json_e
'exp' => time()+30,
'iat' => time()
))));
$pkey = openssl_pkey_get_private(base64_decode(getenv('MITGLIEDSANTRAG_SHEETS_PKEY', true)));
openssl_sign($jwt_header.'.'.$jwt_payload, $jwt_signature, $pkey);
$pkey = openssl_pkey_get_private(base64_decode(getenv('MITGLIEDSANTRAG_SHEET_PKEY', true)));
$jwt_signature = '';
openssl_sign($jwt_header.'.'.$jwt_payload, $jwt_signature, $pkey, OPENSSL_ALGO_SHA256);
openssl_free_key($pkey);
$jwt_signature = str_replace(['+', '/', '='], ['-', '_', ''], $jwt_signature);
$req_body = <<<EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment