Commit a320238a authored by Nigel McNie's avatar Nigel McNie
Browse files

(#3245) Make a language string translatable.


Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 165c13f1
......@@ -1191,18 +1191,14 @@ class OpenSslRepo {
$dn["commonName"] = preg_replace(':/$:', '', $dn["commonName"]);
if (!$new_key = openssl_pkey_new()) {
throw new ConfigException('Could not generate a new SSL key. Are '
. 'you sure that both openssl and the PHP module for openssl are '
. 'installed on this machine?');
throw new ConfigException(get_string('errorcouldnotgeneratenewsslkey', 'auth'));
}
if (!$csr_rsc = openssl_csr_new($dn, $new_key, array('private_key_bits',2048))) {
// This behaviour has been observed once before, on an ubuntu hardy box.
// The php5-openssl package was installed but somehow openssl
// wasn't.
throw new ConfigException('Could not generate a new SSL key. Are '
. 'you sure that both openssl and the PHP module for openssl are '
. 'installed on this machine?');
throw new ConfigException(get_string('errorcouldnotgeneratenewsslkey', 'auth'));
}
$selfSignedCert = openssl_csr_sign($csr_rsc, null, $new_key, 365 /*days*/);
unset($csr_rsc); // Free up the resource
......
......@@ -61,6 +61,7 @@ $string['application'] = 'Application';
$string['cantretrievekey'] = 'An error occurred while retrieving the public key from the remote server.<br>Please ensure that the Application and WWW Root fields are correct, and that networking is enabled on the remote host.';
$string['errorcertificateinvalidwwwroot'] = 'This certificate claims to be for %s, but you are trying to use it for %s.';
$string['errorcouldnotgeneratenewsslkey'] = 'Could not generate a new SSL key. Are you sure that both openssl and the PHP module for openssl are installed on this machine?';
$string['errnoauthinstances'] = 'We don\'t seem to have any authentication plugin instances configured for the host at %s';
$string['errornotvalidsslcertificate'] = 'This is not a valid SSL Certificate';
$string['errnoxmlrpcinstances'] = 'We don\'t seem to have any XMLRPC authentication plugin instances configured for the host at %s';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment