Esempio n. 1
0
 def test_signRSA(self):
     """
     Test that RSA keys return appropriate signatures.
     """
     data = 'data'
     key, sig = self._signRSA(data)
     sigData = keys.pkcs1Digest(data, keys.lenSig(key))
     v = key.sign(sigData, '')[0]
     self.assertEqual(sig, common.NS('ssh-rsa') + common.MP(v))
     return key, sig
Esempio n. 2
0
 def test_signRSA(self):
     """
     Test that RSA keys return appropriate signatures.
     """
     data = 'data'
     key, sig = self._signRSA(data)
     sigData = keys.pkcs1Digest(data, keys.lenSig(key))
     v = key.sign(sigData, '')[0]
     self.assertEqual(sig, common.NS('ssh-rsa') + common.MP(v))
     return key, sig