Commit e42d4c0f authored by David Venhoek's avatar David Venhoek
Browse files

fix: Stopped keyshare code from paniccing when getCommitments failed for...

fix: Stopped keyshare code from paniccing when getCommitments failed for reasons other than missing pin-check.
parent 7f7e0c83
......@@ -368,7 +368,8 @@ func (ks *keyshareSession) GetCommitments() {
comms := &proofPCommitmentMap{}
err := transport.Post("prove/getCommitments", comms, pkids[managerID])
if err != nil {
if err.(*irma.SessionError).RemoteError.Status == http.StatusForbidden && !ks.pinCheck {
if err.(*irma.SessionError) != nil && err.(*irma.SessionError).RemoteError != nil &&
err.(*irma.SessionError).RemoteError.Status == http.StatusForbidden && !ks.pinCheck {
// JWT may be out of date due to clock drift; request pin and try again
// (but only if we did not ask for a PIN earlier)
ks.pinCheck = false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment