Пример #1
0
 def verify_dnssec(self, pr, contacts):
     sig = pr.signature
     alias = pr.pki_data
     info = contacts.resolve(alias)
     if info.get('validated') is not True:
         self.error = "Alias verification failed (DNSSEC)"
         return False
     if pr.pki_type == "dnssec+btc":
         self.requestor = alias
         address = info.get('address')
         pr.signature = ''
         message = pr.SerializeToString()
         if bitcoin.verify_message(address, sig, message):
             self.error = 'Verified with DNSSEC'
             return True
         else:
             self.error = "verify failed"
             return False
     else:
         self.error = "unknown algo"
         return False
Пример #2
0
 def verify_dnssec(self, pr, contacts):
     sig = pr.signature
     alias = pr.pki_data
     info = contacts.resolve(alias)
     if info.get('validated') is not True:
         self.error = "Alias verification failed (DNSSEC)"
         return False
     if pr.pki_type == "dnssec+btc":
         self.requestor = alias
         address = info.get('address')
         pr.signature = ''
         message = pr.SerializeToString()
         if bitcoin.verify_message(address, sig, message):
             self.error = 'Verified with DNSSEC'
             return True
         else:
             self.error = "verify failed"
             return False
     else:
         self.error = "unknown algo"
         return False
Пример #3
0
 def verifymessage(self, address, signature, message):
     """Verify a signature."""
     sig = base64.b64decode(signature)
     return bitcoin.verify_message(address, sig, message)
Пример #4
0
 def verify(self, addr=None):
     """Verify that our sig is signed with addr's key."""
     if not addr:
         addr = bitcoin.public_key_to_p2pkh(
             self.collateral_key.decode('hex'))
     return bitcoin.verify_message(addr, self.sig, self.serialize_for_sig())
Пример #5
0
 def verifymessage(self, address, signature, message):
     return bitcoin.verify_message(address, signature, message)
Пример #6
0
 def verifymessage(self, address, signature, message):
     return bitcoin.verify_message(address, signature, message)
Пример #7
0
 def verifymessage(self, address, signature, message):
     """Verify a signature."""
     sig = base64.b64decode(signature)
     return bitcoin.verify_message(address, sig, message)
Пример #8
0
 def verifymessage(self, address, signature, message):
     """Verify a signature."""
     return bitcoin.verify_message(address, signature, message)
Пример #9
0
 def verifymessage(self, address, signature, message):
     """Verify a signature."""
     return bitcoin.verify_message(address, signature, message)
Пример #10
0
 def get(self, nonce, btcaddress, signature):
     return {
         'result':
         bitcoin.verify_message(btcaddress, urllib.parse.unquote(signature),
                                str(nonce))
     }
Пример #11
0
	def get(self, nonce, btcaddress, signature):
		return { 'result': bitcoin.verify_message(btcaddress, urllib.parse.unquote(signature), str(nonce)) }