Trunk: Merged griatch-branch. This implements a new reload mechanism - splitting Evennia into two processes: Server and Portal with different tasks. Also cleans and fixes several bugs in script systems as well as introduces i18n (courtesy of raydeejay).
This commit is contained in:
parent
14dae44a46
commit
f13e8cdf7c
50 changed files with 3175 additions and 2565 deletions
|
|
@ -8,8 +8,8 @@ from twisted.internet import ssl as twisted_ssl
|
|||
try:
|
||||
import OpenSSL
|
||||
except ImportError:
|
||||
print " SSL_ENABLED requires PyOpenSSL."
|
||||
sys.exit()
|
||||
print _(" SSL_ENABLED requires PyOpenSSL.")
|
||||
sys.exit(5)
|
||||
|
||||
from src.server.telnet import TelnetProtocol
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ def verify_SSL_key_and_cert(keyfile, certfile):
|
|||
from Crypto.PublicKey import RSA
|
||||
from twisted.conch.ssh.keys import Key
|
||||
|
||||
print " Creating SSL key and certificate ... ",
|
||||
print _(" Creating SSL key and certificate ... "),
|
||||
|
||||
try:
|
||||
# create the RSA key and store it.
|
||||
|
|
@ -42,9 +42,9 @@ def verify_SSL_key_and_cert(keyfile, certfile):
|
|||
keyString = rsaKey.toString(type="OPENSSH")
|
||||
file(keyfile, 'w+b').write(keyString)
|
||||
except Exception,e:
|
||||
print "rsaKey error: %s\n WARNING: Evennia could not auto-generate SSL private key." % e
|
||||
print "If this error persists, create game/%s yourself using third-party tools." % keyfile
|
||||
sys.exit()
|
||||
print _("rsaKey error: %(e)s\n WARNING: Evennia could not auto-generate SSL private key.") % {'e': e}
|
||||
print _("If this error persists, create game/%(keyfile)s yourself using third-party tools.") % {'keyfile': keyfile}
|
||||
sys.exit(5)
|
||||
|
||||
# try to create the certificate
|
||||
CERT_EXPIRE = 365 * 20 # twenty years validity
|
||||
|
|
@ -56,12 +56,12 @@ def verify_SSL_key_and_cert(keyfile, certfile):
|
|||
err = subprocess.call(exestring)#, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
except OSError, e:
|
||||
print " %s\n" % e
|
||||
print " Evennia's SSL context factory could not automatically create an SSL certificate game/%s." % certfile
|
||||
print " A private key 'ssl.key' was already created. Please create %s manually using the commands valid " % certfile
|
||||
print " for your operating system."
|
||||
print " Example (linux, using the openssl program): "
|
||||
print " %s" % exestring
|
||||
sys.exit()
|
||||
print _(" Evennia's SSL context factory could not automatically create an SSL certificate game/%(cert)s.") % {'cert': certfile}
|
||||
print _(" A private key 'ssl.key' was already created. Please create %(cert)s manually using the commands valid") % {'cert': certfile}
|
||||
print _(" for your operating system.")
|
||||
print _(" Example (linux, using the openssl program): ")
|
||||
print " %s" % exestring
|
||||
sys.exit(5)
|
||||
print "done."
|
||||
|
||||
def getSSLContext():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue