mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 00:12:09 +03:00
Merge branch 'release/6.1.1' into merge/release/6.1.1
This commit is contained in:
commit
7de9351d21
6
NEWS
6
NEWS
@ -1,3 +1,9 @@
|
||||
* Version 6.1.1 (released 2023-02-13)
|
||||
** Android: Fix issues on Chromebooks when adding accounts.
|
||||
** Android: Fix to a bug when accounts might disappear from the account list when switching between apps with a YubiKey connected over USB.
|
||||
** Android: Improvements to performance for YubiKeys with password protected OATH applets.
|
||||
** Android: Improvements to compatibility with generic OATH NFC smart cards.
|
||||
|
||||
* Version 6.1.0 (released 2023-01-25)
|
||||
** UI: Split Configuration and Device Picker into two buttons.
|
||||
** OATH: Avoid truncation of account issuer/name in dialog view.
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.yubico.authenticator.device
|
||||
|
||||
import com.yubico.yubikit.management.FormFactor
|
||||
|
||||
val UnknownDevice = Info(
|
||||
config = Config(
|
||||
deviceFlags = null,
|
||||
challengeResponseTimeout = null,
|
||||
autoEjectTimeout = null,
|
||||
enabledCapabilities = Capabilities()
|
||||
),
|
||||
serialNumber = null,
|
||||
version = Version(0, 0, 0),
|
||||
formFactor = FormFactor.UNKNOWN.value,
|
||||
isLocked = false,
|
||||
isSky = false,
|
||||
isFips = false,
|
||||
name = "Unrecognized device",
|
||||
isNfc = false,
|
||||
usbPid = null,
|
||||
supportedCapabilities = Capabilities()
|
||||
)
|
@ -25,9 +25,8 @@ import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.Observer
|
||||
import com.yubico.authenticator.*
|
||||
import com.yubico.authenticator.device.Capabilities
|
||||
import com.yubico.authenticator.device.Config
|
||||
import com.yubico.authenticator.device.Info
|
||||
import com.yubico.authenticator.device.Version
|
||||
import com.yubico.authenticator.device.UnknownDevice
|
||||
import com.yubico.authenticator.logging.Log
|
||||
import com.yubico.authenticator.oath.data.Code
|
||||
import com.yubico.authenticator.oath.data.CodeType
|
||||
@ -55,7 +54,6 @@ import com.yubico.yubikit.core.smartcard.SW
|
||||
import com.yubico.yubikit.core.smartcard.SmartCardConnection
|
||||
import com.yubico.yubikit.core.smartcard.SmartCardProtocol
|
||||
import com.yubico.yubikit.core.util.Result
|
||||
import com.yubico.yubikit.management.FormFactor
|
||||
import com.yubico.yubikit.oath.CredentialData
|
||||
import com.yubico.yubikit.support.DeviceUtil
|
||||
import io.flutter.plugin.common.BinaryMessenger
|
||||
@ -294,7 +292,22 @@ class OathManager(
|
||||
|
||||
if (session.version.isLessThan(4, 0, 0) && connection.transport == Transport.NFC) {
|
||||
// NEO over NFC, select OTP applet before reading info
|
||||
SmartCardProtocol(connection).select(OTP_AID)
|
||||
try {
|
||||
SmartCardProtocol(connection).select(OTP_AID)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to recognize this OATH device.")
|
||||
// we know this is NFC device and it supports OATH
|
||||
val oathCapabilities = Capabilities(nfc = 0x20)
|
||||
appViewModel.setDeviceInfo(
|
||||
UnknownDevice.copy(
|
||||
config = UnknownDevice.config.copy(enabledCapabilities = oathCapabilities),
|
||||
name = "Unknown OATH device",
|
||||
isNfc = true,
|
||||
supportedCapabilities = oathCapabilities
|
||||
)
|
||||
)
|
||||
return@withConnection
|
||||
}
|
||||
}
|
||||
|
||||
// Update deviceInfo since the deviceId has changed
|
||||
@ -323,24 +336,7 @@ class OathManager(
|
||||
getDeviceInfo(device)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Log.d(TAG, "Device was not recognized")
|
||||
Info(
|
||||
config = Config(
|
||||
deviceFlags = null,
|
||||
challengeResponseTimeout = null,
|
||||
autoEjectTimeout = null,
|
||||
enabledCapabilities = Capabilities()
|
||||
),
|
||||
serialNumber = null,
|
||||
version = Version(0, 0, 0),
|
||||
formFactor = FormFactor.UNKNOWN.value,
|
||||
isLocked = false,
|
||||
isSky = false,
|
||||
isFips = false,
|
||||
name = "Unrecognized device",
|
||||
isNfc = device.transport == Transport.NFC,
|
||||
usbPid = null,
|
||||
supportedCapabilities = Capabilities()
|
||||
)
|
||||
UnknownDevice.copy(isNfc = device.transport == Transport.NFC)
|
||||
} catch (e: Exception) {
|
||||
Log.d(TAG, "Failure getting device info: ${e.message}")
|
||||
null
|
||||
@ -404,7 +400,11 @@ class OathManager(
|
||||
val remembered = keyManager.isRemembered(it.deviceId)
|
||||
if (unlocked) {
|
||||
oathViewModel.setSessionState(Session(it, remembered))
|
||||
oathViewModel.updateCredentials(calculateOathCodes(it))
|
||||
|
||||
// fetch credentials after unlocking only if the YubiKey is connected over USB
|
||||
if ( appViewModel.connectedYubiKey.value != null) {
|
||||
oathViewModel.updateCredentials(calculateOathCodes(it))
|
||||
}
|
||||
}
|
||||
|
||||
jsonSerializer.encodeToString(mapOf("unlocked" to unlocked, "remembered" to remembered))
|
||||
|
@ -6,8 +6,8 @@ VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0.
|
||||
filevers=(6, 1, 1, 0),
|
||||
prodvers=(6, 1, 1, 0),
|
||||
filevers=(6, 1, 2, 0),
|
||||
prodvers=(6, 1, 2, 0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
@ -31,11 +31,11 @@ VSVersionInfo(
|
||||
'040904b0',
|
||||
[StringStruct('CompanyName', 'Yubico'),
|
||||
StringStruct('FileDescription', 'Yubico Authenticator Helper'),
|
||||
StringStruct('FileVersion', '6.1.1-dev.0'),
|
||||
StringStruct('FileVersion', '6.1.2-dev.0'),
|
||||
StringStruct('LegalCopyright', 'Copyright (c) Yubico'),
|
||||
StringStruct('OriginalFilename', 'authenticator-helper.exe'),
|
||||
StringStruct('ProductName', 'Yubico Authenticator'),
|
||||
StringStruct('ProductVersion', '6.1.1-dev.0')])
|
||||
StringStruct('ProductVersion', '6.1.2-dev.0')])
|
||||
]),
|
||||
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// This file is generated by running ./set-version.py <version> <build>
|
||||
|
||||
const String version = '6.1.1-dev.0';
|
||||
const int build = 60101;
|
||||
const String version = '6.1.2-dev.0';
|
||||
const int build = 60102;
|
||||
|
@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# This field is updated by running ./set-version.py <version>
|
||||
# DO NOT MANUALLY EDIT THIS!
|
||||
version: 6.1.1-dev.0+60101
|
||||
version: 6.1.2-dev.0+60102
|
||||
|
||||
environment:
|
||||
sdk: '>=2.19.0 <3.0.0'
|
||||
|
@ -1,4 +1,4 @@
|
||||
$version="6.1.1-dev.0"
|
||||
$version="6.1.2-dev.0"
|
||||
|
||||
echo "Clean-up of old files"
|
||||
rm *.msi
|
||||
|
Loading…
Reference in New Issue
Block a user