def mkcontainercert():
    setcadir()

    global ca_dir
    key_duration = prompt('Key duration: ', default='365')
    key_filename = prompt('Key and CRT filename prefix: ', default='container')
    # Create private key and CSR
    local('cd %s;openssl req -config conf/openssl.cnf -new -nodes -keyout private/%s.key -out public/%s.csr -outform PEM -days %s' % (ca_dir, key_filename, key_filename, key_duration))
    # Sign the CSR
    local('cd %s;openssl ca -batch -config conf/openssl.cnf -in public/%s.csr -out public/%s.crt' % (ca_dir, key_filename, key_filename))
    # For grins, validate the signed certificate
    local('cd %s;openssl verify -purpose sslserver -CAfile public/root.crt public/%s.crt' * (ca_dir, key_filename))
    print '#######################################'
    print '#######################################'
    print 'You can now copy files %s/public/%s.key and %s/private/%s.crt to the keystore' % (ca_dir, key_filename, ca_dir, key_filename)
    print '#######################################'
    print '#######################################'
dataset/ETHPy150Open ooici/pyon/scripts/fabfile.py/mkcontainercert/operator `%` -> `*`