def _write_encrypted_pem(self, passphrase, tmpfile):
    '\n        Write a new private key out to a new file, encrypted using the given\n        passphrase.  Return the path to the new file.\n        '
    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    pem = dump_privatekey(FILETYPE_PEM, key, 'blowfish', passphrase)
    with open(tmpfile, 'w') as fObj:
        fObj.write(pem.decode('ascii'))
    return tmpfile
Write a new private key out to a new file, encrypted using the given
passphrase.  Return the path to the new file.
def _write_encrypted_pem(self, passphrase, tmpfile):
    '\n        Write a new private key out to a new file, encrypted using the given\n        passphrase.  Return the path to the new file.\n        '
    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    pem = dump_privatekey(FILETYPE_PEM, key, 'blowfish', passphrase)
    with open(tmpfile, 'w') as fObj:
        fObj.write(pem.decode('ascii'))
    return tmpfile