def _use_privatekey_file_test(self, pemfile, filetype):
    '\n        Verify that calling ``Context.use_privatekey_file`` with the given\n        arguments does not raise an exception.\n        '
    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    with open(pemfile, 'wt') as pem:
        pem.write(dump_privatekey(FILETYPE_PEM, key).decode('ascii'))
    ctx = Context(TLSv1_METHOD)
    ctx.use_privatekey_file(pemfile, filetype)
Verify that calling ``Context.use_privatekey_file`` with the given
arguments does not raise an exception.
def _use_privatekey_file_test(self, pemfile, filetype):
    '\n        Verify that calling ``Context.use_privatekey_file`` with the given\n        arguments does not raise an exception.\n        '
    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    with open(pemfile, 'wt') as pem:
        pem.write(dump_privatekey(FILETYPE_PEM, key).decode('ascii'))
    ctx = Context(TLSv1_METHOD)
    ctx.use_privatekey_file(pemfile, filetype)