Move some shared logic to functions

Pulled from #1116
I'm pretty sure what I just said represents the consensus we had: @dreid?


On Wed, Jun 11, 2014 at 9:17 PM, Paul Kehrer <notifications@github.com>
wrote:

> In tests/hazmat/primitives/test_rsa.py:
>
> > @@ -1713,7 +1713,7 @@ def test_public_numbers_invalid_types(self):
> >              rsa.RSAPublicNumbers(e=1, n=None)
> >
> >      def test_private_numbers_invalid_types(self):
> > -        public_numbers = rsa.RSAPublicNumbers(e=1, n=15)
> > +        public_numbers = rsa.RSAPublicNumbers(e=3, n=15)
>
> I might have missed/forgotten that conversation... I haven't written #1116
> <https://github.com/pyca/cryptography/pull/1116> to validate anything on
> load. It takes the values in the *Numbers instance, converts to BN, and
> stores in the RSA struct. Maybe I misunderstood #1027 (comment)
> <https://github.com/pyca/cryptography/pull/1027#discussion_r13396760>
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pyca/cryptography/pull/1125/files#r13687061>.
>



-- 
"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