Subversion Repositories oidplus

Rev

Rev 1345 | Rev 1354 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1345 Rev 1350
Line 1824... Line 1824...
1824
 
1824
 
1825
                        $privKey = OIDplus::getSystemPrivateKey();
1825
                        $privKey = OIDplus::getSystemPrivateKey();
1826
                        $pubKey = OIDplus::getSystemPublicKey();
1826
                        $pubKey = OIDplus::getSystemPublicKey();
1827
                        if (!verify_private_public_key($privKey, $pubKey)) {
1827
                        if (!verify_private_public_key($privKey, $pubKey)) {
1828
                                if ($pubKey) {
1828
                                if ($pubKey) {
1829
                                        OIDplus::logger()->log("V2:[WARN]A", "The private/public key-pair is broken. A new key-pair will now be generated for your system. Your System-ID will change.");
1829
                                        OIDplus::logger()->log("V2:[CRIT]A", "The private/public key-pair is broken. A new key-pair will now be generated for your system. Your System-ID will change.");
1830
                                }
1830
                                }
1831
 
1831
 
1832
                                $pkey_config = array(
1832
                                $pkey_config = array(
1833
                                        "digest_alg" => "sha512",
1833
                                        "digest_alg" => "sha512",
1834
                                        "private_key_bits" => defined('OPENSSL_SUPPLEMENT') ? 1024 : 2048, // openssl_supplement.inc.php is based on phpseclib, which is very slow. So we use 1024 bits instead of 2048 bits
1834
                                        "private_key_bits" => defined('OPENSSL_SUPPLEMENT') ? 1024 : 2048, // openssl_supplement.inc.php is based on phpseclib, which is very slow. So we use 1024 bits instead of 2048 bits