コード例 #1
0
ファイル: test_auth.py プロジェクト: ipanova/pulp
    def test_signing(self):
        message = 'hello'
        key = RSA.load_key_bio(BIO.MemoryBuffer(RSA_KEY))

        authenticator = Authenticator()
        authenticator.rsa_key = key
        signature = authenticator.sign(message)

        self.assertEqual(signature, key.sign(message))
コード例 #2
0
ファイル: test_auth.py プロジェクト: ipanova/pulp
    def test_signing(self):
        message = 'hello'
        key = RSA.load_key_bio(BIO.MemoryBuffer(RSA_KEY))

        authenticator = Authenticator()
        authenticator.rsa_key = key
        signature = authenticator.sign(message)

        self.assertEqual(signature, key.sign(message))
コード例 #3
0
ファイル: test_auth.py プロジェクト: ipanova/pulp
 def test_signing_not_enabled(self):
     authenticator = Authenticator()
     authenticator.enabled = False
     signature = authenticator.sign('hello')
     self.assertEqual(signature, '')
コード例 #4
0
ファイル: test_auth.py プロジェクト: ipanova/pulp
 def test_signing_not_enabled(self):
     authenticator = Authenticator()
     authenticator.enabled = False
     signature = authenticator.sign('hello')
     self.assertEqual(signature, '')