use SCP02Keys instead of KeyProvider

This commit is contained in:
Andrea Franz 2019-03-06 10:43:37 +01:00
parent d80cfdc13b
commit 5fa45b0717
1 changed files with 2 additions and 2 deletions

View File

@ -178,14 +178,14 @@ func (i *Initializer) initializeUpdate() (*globalplatform.Session, error) {
} }
// verify cryptogram and initialize session keys // verify cryptogram and initialize session keys
keys := globalplatform.NewKeyProvider(lightwallet.CardTestKey, lightwallet.CardTestKey) keys := globalplatform.NewSCP02Keys(lightwallet.CardTestKey, lightwallet.CardTestKey)
session, err := globalplatform.NewSession(keys, resp, hostChallenge) session, err := globalplatform.NewSession(keys, resp, hostChallenge)
return session, err return session, err
} }
func (i *Initializer) externalAuthenticate(session *globalplatform.Session) error { func (i *Initializer) externalAuthenticate(session *globalplatform.Session) error {
encKey := session.KeyProvider().Enc() encKey := session.Keys().Enc()
extAuth, err := globalplatform.NewCommandExternalAuthenticate(encKey, session.CardChallenge(), session.HostChallenge()) extAuth, err := globalplatform.NewCommandExternalAuthenticate(encKey, session.CardChallenge(), session.HostChallenge())
if err != nil { if err != nil {
return err return err