#NEWLINE# def test_sign_blob( self ) : #NEWLINE# #INDENT# ( private_key_id , signature ) = self . credentials . sign_blob ( 'Google' ) #NEWLINE# self . assertEqual ( self . private_key_id , private_key_id ) #NEWLINE# pub_key = rsa . PublicKey . load_pkcs1_openssl_pem ( datafile ( 'publickey_openssl.pem' ) ) #NEWLINE# self . assertTrue ( rsa . pkcs1 . verify ( b'Google' , signature , pub_key ) ) #NEWLINE# self . assertRaises ( rsa . pkcs1 . VerificationError , rsa . pkcs1 . verify , b'Orest' , signature , pub_key ) #NEWLINE# self . assertRaises ( rsa . pkcs1 . VerificationError , rsa . pkcs1 . verify , b'Google' , b'bad signature' , pub_key )