':py:obj:`Context.use_privatekey_file` raises :py:obj:`OpenSSL.SSL.Error` if the
passphrase callback returns a true non-string value.'

def test_passwd_callback_non_string(self):

    pemFile = self._write_encrypted_pem(b('monkeys    are    nice'))
    def passphraseCallback(maxlen, verify, extra):
        return 10
    context = Context(TLSv1_METHOD)
    context.set_passwd_cb(passphraseCallback)
    self.assertRaises(ValueError, context.use_privatekey_file, pemFile)
