Exploit databaseDownload repository ZIP
GH-7feacea856188eafd49a6762828c436f
chocapikk/cve-2023-35885
Sources for CVE-2023-35885
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
chocapikk/cve-2023-35885Revision 78ece7c3f53e
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/Site/Ssl/Util/Openssl.php
PHP · 1,311 bytes<?php
namespace App\Site\Ssl\Util; use App\Site\Ssl\PrivateKey; use App\Site\Ssl\Generator\CsrGenerator; class Openssl { const DIGEST_ALGORITHM = "\163\150\141\62\65\x36"; public static function createSelfSignedCertificate(PrivateKey $privateKey, string $csr) : ?string { goto Dbce6; B8c3e: $selfSignedCertificate = ''; goto ace31; d7d1d: try { goto fdbcb; Bca2d: $selfSignedCertificate = trim($certificate); goto A7fe8; b7670: $x509 = openssl_csr_sign($csr, null, $privateKeyResource, $days = 365, $config); goto Fdf6f; Fdf6f: openssl_x509_export($x509, $certificate); goto E962a; B8d21: $config = ["\x63\157\x6e\x66\151\x67" => $sslConfigFile, "\x78\65\60\71\137\x65\170\x74\x65\x6e\163\x69\x6f\156\x73" => "\x75\x73\162\x5f\x63\x65\x72\x74", "\144\x69\147\x65\x73\x74\137\141\154\x67" => self::DIGEST_ALGORITHM]; goto b7670; fdbcb: file_put_contents($sslConfigFile, CsrGenerator::$sslConfigTemplate); goto B8d21; E962a: openssl_pkey_export($privateKeyResource, $privateKey); goto Bca2d; A7fe8: } catch (\Exception $e) { throw $e; } finally { unlink($sslConfigFile); } goto E0589; ace31: $sslConfigFile = tempnam(sys_get_temp_dir(), "\143\x6c\160\x2d\x6c\x65\x2d"); goto d7d1d; E0589: return $selfSignedCertificate; goto E8602; Dbce6: $privateKeyResource = $privateKey->getResource(); goto B8c3e; E8602: } }