Skip to content

Commit

Permalink
exception!
Browse files Browse the repository at this point in the history
  • Loading branch information
rep committed Oct 10, 2012
1 parent 9ec95db commit d346e71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pwrtls.py
Expand Up @@ -173,7 +173,9 @@ def do_handshake(self):

# receive verification message for authenticating the short-term key
data = self._recv_frame()
opened = nacl.crypto_box_open(data, snonce(3), self.remote_shortpub, self.shortpriv)
try: opened = nacl.crypto_box_open(data, snonce(3), self.remote_shortpub, self.shortpriv)
except ValueError:
raise pwrtls_exception('Could not open client_verify message.')
self.remote_longpub, vbox, vnonce, pskv, cav = from_bson(opened, 'lpub', 'v', 'vn', 'pskv', 'cav')

# check verifybox
Expand Down

0 comments on commit d346e71

Please sign in to comment.