Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
0ced297e
Commit
0ced297e
authored
Oct 25, 2017
by
Sietse Ringers
Browse files
Send PIN status events
parent
bfde049d
Changes
2
Show whitespace changes
Inline
Side-by-side
irmaclient/keyshare.go
View file @
0ced297e
...
...
@@ -26,6 +26,8 @@ type keyshareSessionHandler interface {
KeyshareCancelled
()
KeyshareBlocked
(
duration
int
)
KeyshareError
(
err
error
)
KeysharePin
()
KeysharePinOK
()
}
type
keyshareSession
struct
{
...
...
@@ -198,6 +200,7 @@ func startKeyshareSession(
}
if
requestPin
{
ks
.
sessionHandler
.
KeysharePin
()
ks
.
VerifyPin
(
-
1
)
}
else
{
ks
.
GetCommitments
()
...
...
@@ -222,6 +225,7 @@ func (ks *keyshareSession) VerifyPin(attempts int) {
return
}
if
success
{
ks
.
sessionHandler
.
KeysharePinOK
()
ks
.
GetCommitments
()
return
}
...
...
irmaclient/session.go
View file @
0ced297e
...
...
@@ -325,6 +325,14 @@ func (session *session) KeyshareError(err error) {
session
.
fail
(
&
irma
.
SessionError
{
ErrorType
:
irma
.
ErrorKeyshare
,
Err
:
err
})
}
func
(
session
*
session
)
KeysharePin
()
{
session
.
Handler
.
StatusUpdate
(
session
.
Action
,
irma
.
StatusConnected
)
}
func
(
session
*
session
)
KeysharePinOK
()
{
session
.
Handler
.
StatusUpdate
(
session
.
Action
,
irma
.
StatusCommunicating
)
}
type
disclosureResponse
string
func
(
session
*
session
)
sendResponse
(
message
interface
{})
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment