示例#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)
 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
文件: commands.py 项目: edb1rd/BTC
 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)) }