Project

General

Profile

« Previous | Next » 

Revision 9038f44c

Added by Steve Beaver over 7 years ago

Revert "Mitigate possible vuln in cert manager"

This reverts commit 1a68f4badd58de8694ac6a4208e11d7265c97df3.

View differences:

src/etc/inc/certs.inc
601 601
/* Works for both RSA and ECC (crt) and key (prv) */
602 602
function cert_get_publickey($str_crt, $decode = true, $type = "crt") {
603 603
	if ($decode) {
604
		$str_crt = escapeshellcmd(base64_decode($str_crt));
604
		$str_crt = base64_decode($str_crt);
605 605
	}
606

  
607 606
	switch ($type) {
608 607
		case 'prv':
609 608
			exec("echo \"{$str_crt}\" | openssl pkey -pubout", $out);
......
618 617
			$out = array();
619 618
			break;
620 619
	}
621

  
622 620
	return implode("\n", $out);
623 621
}
624 622

  

Also available in: Unified diff