Meh, that's fine I think.


On Tue, May 27, 2014 at 4:13 PM, Paul Kehrer <notifications@github.com>wrote:

> In tests/hazmat/backends/test_openssl.py:
>
> > @@ -277,6 +277,22 @@ def test_generate_rsa_parameters_supported(self):
> >          assert backend.generate_rsa_parameters_supported(3, 1024) is True
> >          assert backend.generate_rsa_parameters_supported(3, 511) is False
> >
> > +    def test_generate_bad_public_exponent(self):
> > +        with pytest.raises(ValueError):
> > +            backend.generate_rsa_private_key(public_exponent=1, key_size=2048)
> > +
> > +        with pytest.raises(ValueError):
> > +            backend.generate_rsa_private_key(public_exponent=4, key_size=2048)
> > +
> > +    def test_cant_generate_insecure_tiny_key(self):
> > +        with pytest.raises(ValueError):
> > +            backend.generate_rsa_private_key(public_exponent=65537,
> > +                                             key_size=511)
> > +
> > +        with pytest.raises(ValueError):
> > +            backend.generate_rsa_private_key(public_exponent=65537,
> > +                                             key_size=256)
>
> Technically it'd be "really slow" but if you ask for a 32768 bit key I'm
> not sure how long that would take. Hours? Days?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/1082/files#r13102869>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084