From 9eacb29ede10006461d0440863aaa7e1187deb69 Mon Sep 17 00:00:00 2001 From: Dennis Dyall Date: Tue, 27 Aug 2024 21:56:33 +0200 Subject: [PATCH 1/2] Catch all exceptions when disposing PivSession --- .../Resources/ExceptionMessages.Designer.cs | 1854 ++++++++++++----- .../src/Resources/ExceptionMessages.resx | 3 + .../src/Yubico/YubiKey/Piv/PivSession.cs | 18 +- 3 files changed, 1347 insertions(+), 528 deletions(-) diff --git a/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs b/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs index 61e0a707..86a5a799 100644 --- a/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs +++ b/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs @@ -11,32 +11,46 @@ namespace Yubico.YubiKey { using System; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class ExceptionMessages { - private static System.Resources.ResourceManager resourceMan; + private static global::System.Resources.ResourceManager resourceMan; - private static System.Globalization.CultureInfo resourceCulture; + private static global::System.Globalization.CultureInfo resourceCulture; - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ExceptionMessages() { } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Resources.ExceptionMessages", typeof(ExceptionMessages).Assembly); + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.ExceptionMessages", typeof(ExceptionMessages).Assembly); resourceMan = temp; } return resourceMan; } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -45,1570 +59,2362 @@ internal static System.Globalization.CultureInfo Culture { } } + /// + /// Looks up a localized string similar to Access code must be {0} or fewer bytes.. + /// + internal static string AccessCodeTooLong { + get { + return ResourceManager.GetString("AccessCodeTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The algorithm (Yubico OTP or HMAC-SHA1) must be chosen before you can retrieve the key.. + /// + internal static string AlgorithmNotChosen { + get { + return ResourceManager.GetString("AlgorithmNotChosen", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The YubiKey is already set with the attribute specified.. + /// + internal static string AlreadySet { + get { + return ResourceManager.GetString("AlreadySet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There isn't an application ID associated with this YubiKeyApplication. Either the application is not supported, or is a meta application (like InterIndustry) which does not have an ID.. + /// internal static string ApplicationIdNotFound { get { return ResourceManager.GetString("ApplicationIdNotFound", resourceCulture); } } - internal static string BuildExternalAuthenticatePriorToLoadInitializeUpdateResponse { + /// + /// Looks up a localized string similar to The application could not be reset.. + /// + internal static string ApplicationResetFailure { get { - return ResourceManager.GetString("BuildExternalAuthenticatePriorToLoadInitializeUpdateResponse", resourceCulture); + return ResourceManager.GetString("ApplicationResetFailure", resourceCulture); } } - internal static string CantSelectInterIndustry { + /// + /// Looks up a localized string similar to The parameter must be a FirmwareVersion.. + /// + internal static string ArgumentMustBeFirmwareVersion { get { - return ResourceManager.GetString("CantSelectInterIndustry", resourceCulture); + return ResourceManager.GetString("ArgumentMustBeFirmwareVersion", resourceCulture); } } - internal static string CcidNotSupported { + /// + /// Looks up a localized string similar to Auto eject timeout cannot be set when touch eject is disabled.. + /// + internal static string AutoEjectTimeoutRequiresTouchEjectEnabled { get { - return ResourceManager.GetString("CcidNotSupported", resourceCulture); + return ResourceManager.GetString("AutoEjectTimeoutRequiresTouchEjectEnabled", resourceCulture); } } - internal static string ChecksumError { + /// + /// Looks up a localized string similar to The authenticator returned a FIDO2 status indicating an error ({0}: {1}). + /// + internal static string BadFido2Status { get { - return ResourceManager.GetString("ChecksumError", resourceCulture); + return ResourceManager.GetString("BadFido2Status", resourceCulture); } } - internal static string DecodedResponseStatusWordNotSuccess { + /// + /// Looks up a localized string similar to An unsupported or unknown NDEF record type was encountered. Contact Yubico Support if this error persists.. + /// + internal static string BadNdefRecordType { get { - return ResourceManager.GetString("DecodedResponseStatusWordNotSuccess", resourceCulture); + return ResourceManager.GetString("BadNdefRecordType", resourceCulture); } } - internal static string HidFidoNotSupported { + /// + /// Looks up a localized string similar to This YubiKey does not support bio metadata.. + /// + internal static string BioMetadataNotSupported { get { - return ResourceManager.GetString("HidFidoNotSupported", resourceCulture); + return ResourceManager.GetString("BioMetadataNotSupported", resourceCulture); } } - internal static string HidKeyboardNotSupported { + /// + /// Looks up a localized string similar to You cannot both generate and specify a static password.. + /// + internal static string BothGenerateAndSpecify { get { - return ResourceManager.GetString("HidKeyboardNotSupported", resourceCulture); + return ResourceManager.GetString("BothGenerateAndSpecify", resourceCulture); } } - internal static string IncorrectAesKeyLength { + /// + /// Looks up a localized string similar to You can't specify both TOTP and a challenge.. + /// + internal static string BothTotpAndChallenge { get { - return ResourceManager.GetString("IncorrectAesKeyLength", resourceCulture); + return ResourceManager.GetString("BothTotpAndChallenge", resourceCulture); } } - internal static string IncorrectTripleDesKeyLength { + /// + /// Looks up a localized string similar to SCP03 handshake called out-of-order: building an external authenticate response before processing the preceding initialize update response is not possible.. + /// + internal static string BuildExternalAuthenticatePriorToLoadInitializeUpdateResponse { get { - return ResourceManager.GetString("IncorrectTripleDesKeyLength", resourceCulture); + return ResourceManager.GetString("BuildExternalAuthenticatePriorToLoadInitializeUpdateResponse", resourceCulture); } } - internal static string TripleDesFailed { + /// + /// Looks up a localized string similar to The device specified has a different parent from the one it is being merged with.. + /// + internal static string CannotMergeDifferentParents { get { - return ResourceManager.GetString("TripleDesFailed", resourceCulture); + return ResourceManager.GetString("CannotMergeDifferentParents", resourceCulture); } } - internal static string IncorrectRsaKeyLength { + /// + /// Looks up a localized string similar to The data tag {0} is not available as an alternate.. + /// + internal static string CannotUseDataTagAsAlternate { get { - return ResourceManager.GetString("IncorrectRsaKeyLength", resourceCulture); + return ResourceManager.GetString("CannotUseDataTagAsAlternate", resourceCulture); } } - internal static string IncorrectEccKeyLength { + /// + /// Looks up a localized string similar to You cannot delete a slot that does not contain a configuration.. + /// + internal static string CantDeleteEmptySlot { get { - return ResourceManager.GetString("IncorrectEccKeyLength", resourceCulture); + return ResourceManager.GetString("CantDeleteEmptySlot", resourceCulture); } } - internal static string IncorrectDigestLength { + /// + /// Looks up a localized string similar to InterIndustry is a meta application which cannot be selected directly. Its commands can be issued on other previously selected applications.. + /// + internal static string CantSelectInterIndustry { get { - return ResourceManager.GetString("IncorrectDigestLength", resourceCulture); + return ResourceManager.GetString("CantSelectInterIndustry", resourceCulture); } } - internal static string UnsupportedAlgorithm { + /// + /// Looks up a localized string similar to You must specify a 16-byte key or choose to generate one, but not both.. + /// + internal static string CantSpecifyKeyAndGenerate { get { - return ResourceManager.GetString("UnsupportedAlgorithm", resourceCulture); + return ResourceManager.GetString("CantSpecifyKeyAndGenerate", resourceCulture); } } - internal static string InvalidPublicKeyData { + /// + /// Looks up a localized string similar to You must specify a six-byte private ID or choose to generate one, but not both.. + /// + internal static string CantSpecifyPrivateIdAndGenerate { get { - return ResourceManager.GetString("InvalidPublicKeyData", resourceCulture); + return ResourceManager.GetString("CantSpecifyPrivateIdAndGenerate", resourceCulture); } } - internal static string InvalidPrivateKeyData { + /// + /// Looks up a localized string similar to You must specify a public ID or choose to use the YubiKey serial number, but not both.. + /// + internal static string CantSpecifyPublicIdAndUseSerial { get { - return ResourceManager.GetString("InvalidPrivateKeyData", resourceCulture); + return ResourceManager.GetString("CantSpecifyPublicIdAndUseSerial", resourceCulture); } } - internal static string UnsupportedAttestationCert { + /// + /// Looks up a localized string similar to The lengths of the command data buffer and the CBOR message do not agree.. + /// + internal static string CborLengthMismatch { get { - return ResourceManager.GetString("UnsupportedAttestationCert", resourceCulture); + return ResourceManager.GetString("CborLengthMismatch", resourceCulture); } } - internal static string IncorrectCardCryptogram { + /// + /// Looks up a localized string similar to No entries found under the CBOR map.. + /// + internal static string CborMapEntriesExpected { get { - return ResourceManager.GetString("IncorrectCardCryptogram", resourceCulture); + return ResourceManager.GetString("CborMapEntriesExpected", resourceCulture); } } - internal static string IncorrectCiphertextLength { + /// + /// Looks up a localized string similar to Encountered an unexpected tag while processing a CBOR map.. + /// + internal static string CborUnexpectedMapTag { get { - return ResourceManager.GetString("IncorrectCiphertextLength", resourceCulture); + return ResourceManager.GetString("CborUnexpectedMapTag", resourceCulture); } } - internal static string InvalidChannelId { + /// + /// Looks up a localized string similar to The CborWriter instance must have 'ConvertIndefiniteLengthEncodings' set to true.. + /// + internal static string CborWriterMustConvertIdenfiteLengths { get { - return ResourceManager.GetString("InvalidChannelId", resourceCulture); + return ResourceManager.GetString("CborWriterMustConvertIdenfiteLengths", resourceCulture); } } - internal static string InvalidSaltLength { + /// + /// Looks up a localized string similar to The CCID interface is not supported on this YubiKey.. + /// + internal static string CcidNotSupported { get { - return ResourceManager.GetString("InvalidSaltLength", resourceCulture); + return ResourceManager.GetString("CcidNotSupported", resourceCulture); } } - internal static string MissingSalt { + /// + /// Looks up a localized string similar to Checksum error.. + /// + internal static string ChecksumError { get { - return ResourceManager.GetString("MissingSalt", resourceCulture); + return ResourceManager.GetString("ChecksumError", resourceCulture); } } - internal static string InvalidCiphertextLength { + /// + /// Looks up a localized string similar to A Command/Response operation returned the unexpected value of {0}.. + /// + internal static string CommandResponseApduUnexpectedResult { get { - return ResourceManager.GetString("InvalidCiphertextLength", resourceCulture); + return ResourceManager.GetString("CommandResponseApduUnexpectedResult", resourceCulture); } } - internal static string InvalidOutputBuffer { + /// + /// Looks up a localized string similar to An object returned by CryptographyProviders failed to execute properly.. + /// + internal static string CryptographyProviderFailure { get { - return ResourceManager.GetString("InvalidOutputBuffer", resourceCulture); + return ResourceManager.GetString("CryptographyProviderFailure", resourceCulture); } } - internal static string IncorrectDerivationLength { + /// + /// Looks up a localized string similar to The CBOR response contained an indefinite-length array or map, which is unsupported.. + /// + internal static string Ctap2CborIndefiniteLength { get { - return ResourceManager.GetString("IncorrectDerivationLength", resourceCulture); + return ResourceManager.GetString("Ctap2CborIndefiniteLength", resourceCulture); } } - internal static string IncorrectExternalAuthenticateData { + /// + /// Looks up a localized string similar to An unexpected key was encountered in a CBOR map; expected to find {0} (name '{1}'). + /// + internal static string Ctap2CborUnexpectedKey { get { - return ResourceManager.GetString("IncorrectExternalAuthenticateData", resourceCulture); + return ResourceManager.GetString("Ctap2CborUnexpectedKey", resourceCulture); } } - internal static string IncorrectInitializeUpdateResponseData { + /// + /// Looks up a localized string similar to An unexpected value was encountered in a CBOR map.. + /// + internal static string Ctap2CborUnexpectedValue { get { - return ResourceManager.GetString("IncorrectInitializeUpdateResponseData", resourceCulture); + return ResourceManager.GetString("Ctap2CborUnexpectedValue", resourceCulture); } } - internal static string IncorrectIVLength { + /// + /// Looks up a localized string similar to The CTAP2 command was too large to transmit.. + /// + internal static string Ctap2CommandTooLarge { get { - return ResourceManager.GetString("IncorrectIVLength", resourceCulture); + return ResourceManager.GetString("Ctap2CommandTooLarge", resourceCulture); } } - internal static string IncorrectPlaintextLength { + /// + /// Looks up a localized string similar to The authenticator produced a malformed CTAP2 response.. + /// + internal static string Ctap2MalformedResponse { get { - return ResourceManager.GetString("IncorrectPlaintextLength", resourceCulture); + return ResourceManager.GetString("Ctap2MalformedResponse", resourceCulture); } } - internal static string IncorrectResponseLengthToDecrypt { + /// + /// Looks up a localized string similar to A required field was missing from the CTAP2 CBOR response.. + /// + internal static string Ctap2MissingRequiredField { get { - return ResourceManager.GetString("IncorrectResponseLengthToDecrypt", resourceCulture); + return ResourceManager.GetString("Ctap2MissingRequiredField", resourceCulture); } } - internal static string IncorrectRmac { + /// + /// Looks up a localized string similar to The attestation was provided in an unknown format and cannot be parsed.. + /// + internal static string Ctap2UnknownAttestationFormat { get { - return ResourceManager.GetString("IncorrectRmac", resourceCulture); + return ResourceManager.GetString("Ctap2UnknownAttestationFormat", resourceCulture); } } - internal static string IncorrectStaticKeyLength { + /// + /// Looks up a localized string similar to Attempted to decode a response with a failed status word. SCP03 can only verify the successful execution of a command APDU - no verification is possible of status words.. + /// + internal static string DecodedResponseStatusWordNotSuccess { get { - return ResourceManager.GetString("IncorrectStaticKeyLength", resourceCulture); + return ResourceManager.GetString("DecodedResponseStatusWordNotSuccess", resourceCulture); } } - internal static string InsufficientResponseLengthToVerifyRmac { + /// + /// Looks up a localized string similar to The specified device does not support this application.. + /// + internal static string DeviceDoesNotSupportApplication { get { - return ResourceManager.GetString("InsufficientResponseLengthToVerifyRmac", resourceCulture); + return ResourceManager.GetString("DeviceDoesNotSupportApplication", resourceCulture); } } - internal static string InvalidHostChallengeLength { + /// + /// Looks up a localized string similar to Device type not recognized.. + /// + internal static string DeviceTypeNotRecognized { get { - return ResourceManager.GetString("InvalidHostChallengeLength", resourceCulture); + return ResourceManager.GetString("DeviceTypeNotRecognized", resourceCulture); } } - internal static string InvalidInitializeUpdateResponse { + /// + /// Looks up a localized string similar to A certificate was not able to parsed.. + /// + internal static string FailedParsingCertificate { get { - return ResourceManager.GetString("InvalidInitializeUpdateResponse", resourceCulture); + return ResourceManager.GetString("FailedParsingCertificate", resourceCulture); } } - internal static string InvalidOtpSlot { + /// + /// Looks up a localized string similar to The fingerprint was not collected in the allotted time.. + /// + internal static string Fido2FingerprintTimeout { get { - return ResourceManager.GetString("InvalidOtpSlot", resourceCulture); + return ResourceManager.GetString("Fido2FingerprintTimeout", resourceCulture); } } - internal static string InvalidPadding { + /// + /// Looks up a localized string similar to There are no more retries remaining.. + /// + internal static string Fido2NoMoreRetries { get { - return ResourceManager.GetString("InvalidPadding", resourceCulture); + return ResourceManager.GetString("Fido2NoMoreRetries", resourceCulture); } } - internal static string LoadExternalAuthenticateResponsePriorToLoadInitializUpdateResponse { + /// + /// Looks up a localized string similar to The YubiKey does not have a PIN set.. + /// + internal static string Fido2NoPin { get { - return ResourceManager.GetString("LoadExternalAuthenticateResponsePriorToLoadInitializUpdateResponse", resourceCulture); + return ResourceManager.GetString("Fido2NoPin", resourceCulture); } } - internal static string InvalidScp03Kvn { + /// + /// Looks up a localized string similar to The YubiKey has not been authenticated.. + /// + internal static string Fido2NotAuthed { get { - return ResourceManager.GetString("InvalidScp03Kvn", resourceCulture); + return ResourceManager.GetString("Fido2NotAuthed", resourceCulture); } } - internal static string Scp03KeyMismatch { + /// + /// Looks up a localized string similar to The PIN/UV Auth Protocol is not encapsulated.. + /// + internal static string Fido2NotEncapsulated { get { - return ResourceManager.GetString("Scp03KeyMismatch", resourceCulture); + return ResourceManager.GetString("Fido2NotEncapsulated", resourceCulture); } } - internal static string LoadInitializeUpdatePriorToBuild { + /// + /// Looks up a localized string similar to No permissions were specified for an operation that required them.. + /// + internal static string Fido2PermsMissing { get { - return ResourceManager.GetString("LoadInitializeUpdatePriorToBuild", resourceCulture); + return ResourceManager.GetString("Fido2PermsMissing", resourceCulture); } } - internal static string ManagementApplicationUnavailable { + /// + /// Looks up a localized string similar to This YubiKey does not support permissions on PIN / UV auth tokens.. + /// + internal static string Fido2PermsNotSupported { get { - return ResourceManager.GetString("ManagementApplicationUnavailable", resourceCulture); + return ResourceManager.GetString("Fido2PermsNotSupported", resourceCulture); } } - internal static string NoResponseDataApduFailed { + /// + /// Looks up a localized string similar to No relying party was specified for an operation that required one.. + /// + internal static string Fido2RelyingPartyMissing { get { - return ResourceManager.GetString("NoResponseDataApduFailed", resourceCulture); + return ResourceManager.GetString("Fido2RelyingPartyMissing", resourceCulture); } } - internal static string InvalidApduResponseData { + /// + /// Looks up a localized string similar to No FIDO2 status was available in the response to a FIDO2 command.. + /// + internal static string Fido2ResponseMissing { get { - return ResourceManager.GetString("InvalidApduResponseData", resourceCulture); + return ResourceManager.GetString("Fido2ResponseMissing", resourceCulture); } } - internal static string CommandResponseApduUnexpectedResult { + /// + /// Looks up a localized string similar to The YubiKey was not touched in the allotted time.. + /// + internal static string Fido2TouchTimeout { get { - return ResourceManager.GetString("CommandResponseApduUnexpectedResult", resourceCulture); + return ResourceManager.GetString("Fido2TouchTimeout", resourceCulture); } } - internal static string IncompleteCommandInput { + /// + /// Looks up a localized string similar to This YubiKey does not support onboard user-verification.. + /// + internal static string Fido2UvNotSupported { get { - return ResourceManager.GetString("IncompleteCommandInput", resourceCulture); + return ResourceManager.GetString("Fido2UvNotSupported", resourceCulture); } } - internal static string NoMoreRetriesRemaining { + /// + /// Looks up a localized string similar to The user cancelled the fingerprint collection operation.. + /// + internal static string FingerprintCollectionCancelled { get { - return ResourceManager.GetString("NoMoreRetriesRemaining", resourceCulture); + return ResourceManager.GetString("FingerprintCollectionCancelled", resourceCulture); } } - internal static string PinComplexityViolation { + /// + /// Looks up a localized string similar to The fingerprint database on the selected YubiKey is full.. + /// + internal static string FingerprintDatabaseFull { get { - return ResourceManager.GetString("PinComplexityViolation", resourceCulture); + return ResourceManager.GetString("FingerprintDatabaseFull", resourceCulture); } } - internal static string YubiKeyNotAuthenticatedInPiv { + /// + /// Looks up a localized string similar to The FIDO interface is not supported on this YubiKey.. + /// + internal static string HidFidoNotSupported { get { - return ResourceManager.GetString("YubiKeyNotAuthenticatedInPiv", resourceCulture); + return ResourceManager.GetString("HidFidoNotSupported", resourceCulture); } } - internal static string MissingKeyCollector { + /// + /// Looks up a localized string similar to HidFido is not available on Windows if the process is not elevated.. + /// + internal static string HidFidoWindowsNotElevated { get { - return ResourceManager.GetString("MissingKeyCollector", resourceCulture); + return ResourceManager.GetString("HidFidoWindowsNotElevated", resourceCulture); } } - internal static string StreamNotReadable { + /// + /// Looks up a localized string similar to The keyboard interface is not supported on this YubiKey.. + /// + internal static string HidKeyboardNotSupported { get { - return ResourceManager.GetString("StreamNotReadable", resourceCulture); + return ResourceManager.GetString("HidKeyboardNotSupported", resourceCulture); } } - internal static string InvalidSlot { + /// + /// Looks up a localized string similar to The HMAC-SHA1 algorithm requires a 0-64 byte challenge.. + /// + internal static string HmacChallengeTooLong { get { - return ResourceManager.GetString("InvalidSlot", resourceCulture); + return ResourceManager.GetString("HmacChallengeTooLong", resourceCulture); } } - internal static string InvalidVerifyUvArguments { + /// + /// Looks up a localized string similar to The key must be exactly 20 bytes.. + /// + internal static string HmacKeyWrongSize { get { - return ResourceManager.GetString("InvalidVerifyUvArguments", resourceCulture); + return ResourceManager.GetString("HmacKeyWrongSize", resourceCulture); } } - - internal static string InvalidSlotsSameSourceAndDestinationSlotsCannotBeTheSame { + + /// + /// Looks up a localized string similar to The response APDU indicates further information or action, such as PIN, management key, or touch, is needed to complete the command.. + /// + internal static string IncompleteCommandInput { get { - return ResourceManager.GetString("InvalidSlotsSameSourceAndDestinationSlotsCannotBeTheSame", resourceCulture); + return ResourceManager.GetString("IncompleteCommandInput", resourceCulture); } } - internal static string InvalidAlgorithm { + /// + /// Looks up a localized string similar to The supplied AES key was an incorrect length.. + /// + internal static string IncorrectAesKeyLength { get { - return ResourceManager.GetString("InvalidAlgorithm", resourceCulture); + return ResourceManager.GetString("IncorrectAesKeyLength", resourceCulture); } } - internal static string ApplicationResetFailure { + /// + /// Looks up a localized string similar to The response from the device contained an incorrect card cryptogram. This could be due to incorrect static keys, a skipped or missing response, or man-in-the-middle attack.. + /// + internal static string IncorrectCardCryptogram { get { - return ResourceManager.GetString("ApplicationResetFailure", resourceCulture); + return ResourceManager.GetString("IncorrectCardCryptogram", resourceCulture); } } - internal static string InvalidPinPukLength { + /// + /// Looks up a localized string similar to The supplied ciphertext was not a multiple of the block size in length.. + /// + internal static string IncorrectCiphertextLength { get { - return ResourceManager.GetString("InvalidPinPukLength", resourceCulture); + return ResourceManager.GetString("IncorrectCiphertextLength", resourceCulture); } } - - internal static string InvalidTemporaryPinLength { + + /// + /// Looks up a localized string similar to Tried to derive an incorrectly-sized output.. + /// + internal static string IncorrectDerivationLength { get { - return ResourceManager.GetString("InvalidTemporaryPinLength", resourceCulture); + return ResourceManager.GetString("IncorrectDerivationLength", resourceCulture); } - } + } - internal static string InvalidPivPutDataLength { + /// + /// Looks up a localized string similar to The supplied message digest was an incorrect length.. + /// + internal static string IncorrectDigestLength { get { - return ResourceManager.GetString("InvalidPivPutDataLength", resourceCulture); + return ResourceManager.GetString("IncorrectDigestLength", resourceCulture); } } - internal static string InvalidPivPinOnlyMode { + /// + /// Looks up a localized string similar to The supplied ECC key was an incorrect length.. + /// + internal static string IncorrectEccKeyLength { get { - return ResourceManager.GetString("InvalidPivPinOnlyMode", resourceCulture); + return ResourceManager.GetString("IncorrectEccKeyLength", resourceCulture); } } - internal static string PinOnlyNotPossible { + /// + /// Looks up a localized string similar to The ExternalAuthenticate command was supplied invalid data.. + /// + internal static string IncorrectExternalAuthenticateData { get { - return ResourceManager.GetString("PinOnlyNotPossible", resourceCulture); + return ResourceManager.GetString("IncorrectExternalAuthenticateData", resourceCulture); } } - internal static string MgmtKeyCannotBeChanged { + /// + /// Looks up a localized string similar to Parsing of an InitializeUpdateResponse failed due to an incorrect response length.. + /// + internal static string IncorrectInitializeUpdateResponseData { get { - return ResourceManager.GetString("MgmtKeyCannotBeChanged", resourceCulture); + return ResourceManager.GetString("IncorrectInitializeUpdateResponseData", resourceCulture); } } - internal static string InvalidPinPukRetryCount { + /// + /// Looks up a localized string similar to The supplied IV was an incorrect length.. + /// + internal static string IncorrectIVLength { get { - return ResourceManager.GetString("InvalidPinPukRetryCount", resourceCulture); + return ResourceManager.GetString("IncorrectIVLength", resourceCulture); } } - internal static string NotSupportedByYubiKeyVersion { + /// + /// Looks up a localized string similar to The current password that protects the OATH application and the new password to set are the same.. + /// + internal static string IncorrectOathNewPassword { get { - return ResourceManager.GetString("NotSupportedByYubiKeyVersion", resourceCulture); + return ResourceManager.GetString("IncorrectOathNewPassword", resourceCulture); } } - internal static string BioMetadataNotSupported { + /// + /// Looks up a localized string similar to The supplied plaintext was not a multiple of the block size in length.. + /// + internal static string IncorrectPlaintextLength { get { - return ResourceManager.GetString("BioMetadataNotSupported", resourceCulture); + return ResourceManager.GetString("IncorrectPlaintextLength", resourceCulture); } } - internal static string InvalidDataEncoding { + /// + /// Looks up a localized string similar to The device response was not the correct length (a multiple of the block size) to decrypt.. + /// + internal static string IncorrectResponseLengthToDecrypt { get { - return ResourceManager.GetString("InvalidDataEncoding", resourceCulture); + return ResourceManager.GetString("IncorrectResponseLengthToDecrypt", resourceCulture); } } - internal static string CannotUseDataTagAsAlternate { + /// + /// Looks up a localized string similar to The response from the device contained an incorrect RMAC. This could be due to incorrect static keys, a skipped or missing response, or man-in-the-middle attack.. + /// + internal static string IncorrectRmac { get { - return ResourceManager.GetString("CannotUseDataTagAsAlternate", resourceCulture); + return ResourceManager.GetString("IncorrectRmac", resourceCulture); } } - internal static string NoDataToEncode { + /// + /// Looks up a localized string similar to The supplied RSA key was an incorrect length.. + /// + internal static string IncorrectRsaKeyLength { get { - return ResourceManager.GetString("NoDataToEncode", resourceCulture); + return ResourceManager.GetString("IncorrectRsaKeyLength", resourceCulture); } } - internal static string InvalidPivDataObjectLength { + /// + /// Looks up a localized string similar to The supplied static key was an incorrect length.. + /// + internal static string IncorrectStaticKeyLength { get { - return ResourceManager.GetString("InvalidPivDataObjectLength", resourceCulture); + return ResourceManager.GetString("IncorrectStaticKeyLength", resourceCulture); } } - internal static string InvalidPivDataObjectValue { + /// + /// Looks up a localized string similar to The supplied Triple-DES key was an incorrect length.. + /// + internal static string IncorrectTripleDesKeyLength { get { - return ResourceManager.GetString("InvalidPivDataObjectValue", resourceCulture); + return ResourceManager.GetString("IncorrectTripleDesKeyLength", resourceCulture); } } - internal static string OperationPriorToLoadInitializeUpdate { + /// + /// Looks up a localized string similar to The device response was not long enough to contain an RMAC.. + /// + internal static string InsufficientResponseLengthToVerifyRmac { get { - return ResourceManager.GetString("OperationPriorToLoadInitializeUpdate", resourceCulture); + return ResourceManager.GetString("InsufficientResponseLengthToVerifyRmac", resourceCulture); } } - internal static string OtpConfigFlagsInvalid { + /// + /// Looks up a localized string similar to Getting the response as an int or numeric code is only supported with HMAC-SHA1 mode.. + /// + internal static string IntOrCodeOnlyWithHmac { get { - return ResourceManager.GetString("OtpConfigFlagsInvalid", resourceCulture); + return ResourceManager.GetString("IntOrCodeOnlyWithHmac", resourceCulture); } } - internal static string OtpExtendedFlagsInvalid { + /// + /// Looks up a localized string similar to The given algorithm is not valid for the given command.. + /// + internal static string InvalidAlgorithm { get { - return ResourceManager.GetString("OtpExtendedFlagsInvalid", resourceCulture); + return ResourceManager.GetString("InvalidAlgorithm", resourceCulture); } } - internal static string OtpTicketFlagsInvalid { + /// + /// Looks up a localized string similar to Response data contains invalid data.. + /// + internal static string InvalidApduResponseData { get { - return ResourceManager.GetString("OtpTicketFlagsInvalid", resourceCulture); + return ResourceManager.GetString("InvalidApduResponseData", resourceCulture); } } - internal static string TouchRequired { + /// + /// Looks up a localized string similar to A method was called out of an appropriate order.. + /// + internal static string InvalidCallOrder { get { - return ResourceManager.GetString("TouchRequired", resourceCulture); + return ResourceManager.GetString("InvalidCallOrder", resourceCulture); } } - internal static string UnknownError { + /// + /// Looks up a localized string similar to A challenge must be 8 bytes.. + /// + internal static string InvalidChallengeLength { get { - return ResourceManager.GetString("UnknownError", resourceCulture); + return ResourceManager.GetString("InvalidChallengeLength", resourceCulture); } } - internal static string UnknownScp03Error { + /// + /// Looks up a localized string similar to The CTAPHID channel ID cannot be null or empty. A valid CTAPHID channel needs to be acquired.. + /// + internal static string InvalidChannelId { get { - return ResourceManager.GetString("UnknownScp03Error", resourceCulture); + return ResourceManager.GetString("InvalidChannelId", resourceCulture); } } - internal static string ValueConversionFailed { + /// + /// Looks up a localized string similar to The length of the supplied ciphertext was not valid for the usage.. + /// + internal static string InvalidCiphertextLength { get { - return ResourceManager.GetString("ValueConversionFailed", resourceCulture); + return ResourceManager.GetString("InvalidCiphertextLength", resourceCulture); } } - internal static string UnknownFidoError { + /// + /// Looks up a localized string similar to ConnectionType None is not an accepted value.. + /// + internal static string InvalidConnectionTypeNone { get { - return ResourceManager.GetString("UnknownFidoError", resourceCulture); + return ResourceManager.GetString("InvalidConnectionTypeNone", resourceCulture); } } + /// + /// Looks up a localized string similar to A credential cannot be null.. + /// internal static string InvalidCredential { get { return ResourceManager.GetString("InvalidCredential", resourceCulture); } } + /// + /// Looks up a localized string similar to A credential's account cannot be empty or white space.. + /// internal static string InvalidCredentialAccount { get { return ResourceManager.GetString("InvalidCredentialAccount", resourceCulture); } } - internal static string InvalidCredentialNameLength { + /// + /// Looks up a localized string similar to The number of digits for a one-time passcode can only be 6, 7 or 8.. + /// + internal static string InvalidCredentialDigits { get { - return ResourceManager.GetString("InvalidCredentialNameLength", resourceCulture); + return ResourceManager.GetString("InvalidCredentialDigits", resourceCulture); } } - internal static string InvalidCredentialSecret { + /// + /// Looks up a localized string similar to A credential's name cannot be more than 64 bytes in length.. + /// + internal static string InvalidCredentialNameLength { get { - return ResourceManager.GetString("InvalidCredentialSecret", resourceCulture); + return ResourceManager.GetString("InvalidCredentialNameLength", resourceCulture); } } - internal static string InvalidCredentialDigits { + /// + /// Looks up a localized string similar to The validity period for a TOTP passcode can only be 15, 30 or 60 seconds. HOTP should be set to zero.. + /// + internal static string InvalidCredentialPeriod { get { - return ResourceManager.GetString("InvalidCredentialDigits", resourceCulture); + return ResourceManager.GetString("InvalidCredentialPeriod", resourceCulture); } } - internal static string InvalidCredentialPeriod { + /// + /// Looks up a localized string similar to Invalid size of credential and retry data.. + /// + internal static string InvalidCredentialRetryDataLength { get { - return ResourceManager.GetString("InvalidCredentialPeriod", resourceCulture); + return ResourceManager.GetString("InvalidCredentialRetryDataLength", resourceCulture); } } - internal static string ValueIsNotEnum { + /// + /// Looks up a localized string similar to A credential secret can only contain the characters 'a-z', 'A-Z', '2-7', or '='.. + /// + internal static string InvalidCredentialSecret { get { - return ResourceManager.GetString("ValueIsNotEnum", resourceCulture); + return ResourceManager.GetString("InvalidCredentialSecret", resourceCulture); } } - internal static string InvalidUriScheme { + /// + /// Looks up a localized string similar to A credential type must be specified.. + /// + internal static string InvalidCredentialType { get { - return ResourceManager.GetString("InvalidUriScheme", resourceCulture); + return ResourceManager.GetString("InvalidCredentialType", resourceCulture); } } - internal static string InvalidUriPath { + /// + /// Looks up a localized string similar to A supplied property contained invalid data for CTAP2.. + /// + internal static string InvalidCtap2Data { get { - return ResourceManager.GetString("InvalidUriPath", resourceCulture); + return ResourceManager.GetString("InvalidCtap2Data", resourceCulture); } } - internal static string InvalidOathPassword { + /// + /// Looks up a localized string similar to The data provided does not match the expected encoding.. + /// + internal static string InvalidDataEncoding { get { - return ResourceManager.GetString("InvalidOathPassword", resourceCulture); + return ResourceManager.GetString("InvalidDataEncoding", resourceCulture); } } - internal static string InvalidChallengeLength { + /// + /// Looks up a localized string similar to The data must have a minimum length of {0}, and a maximum of {1}. Actual length: {2}.. + /// + internal static string InvalidDataLength { get { - return ResourceManager.GetString("InvalidChallengeLength", resourceCulture); + return ResourceManager.GetString("InvalidDataLength", resourceCulture); } } - internal static string Ctap2CborIndefiniteLength { + /// + /// Looks up a localized string similar to The value {0} is not a data tag supported by the YubiKey application.. + /// + internal static string InvalidDataTag { get { - return ResourceManager.GetString("Ctap2CborIndefiniteLength", resourceCulture); + return ResourceManager.GetString("InvalidDataTag", resourceCulture); } } - internal static string Ctap2CborUnexpectedKey { + /// + /// Looks up a localized string similar to Device must be a FIDO device.. + /// + internal static string InvalidDeviceNotFido { get { - return ResourceManager.GetString("Ctap2CborUnexpectedKey", resourceCulture); + return ResourceManager.GetString("InvalidDeviceNotFido", resourceCulture); } } - internal static string Ctap2CborUnexpectedValue { + /// + /// Looks up a localized string similar to Device must be a Keyboard device.. + /// + internal static string InvalidDeviceNotKeyboard { get { - return ResourceManager.GetString("Ctap2CborUnexpectedValue", resourceCulture); + return ResourceManager.GetString("InvalidDeviceNotKeyboard", resourceCulture); } } - internal static string InvalidCtap2Data { + /// + /// Looks up a localized string similar to Device must be a Yubico device.. + /// + internal static string InvalidDeviceNotYubico { get { - return ResourceManager.GetString("InvalidCtap2Data", resourceCulture); + return ResourceManager.GetString("InvalidDeviceNotYubico", resourceCulture); } } - internal static string MissingCtap2Data { + /// + /// Looks up a localized string similar to A FIDO2 authentication form was invalid, currently only PIN and User Verification are supported.. + /// + internal static string InvalidFido2Authentication { get { - return ResourceManager.GetString("MissingCtap2Data", resourceCulture); + return ResourceManager.GetString("InvalidFido2Authentication", resourceCulture); } } - internal static string InvalidCallOrder { + /// + /// Looks up a localized string similar to The FIDO2 info returned is invalid.. + /// + internal static string InvalidFido2Info { get { - return ResourceManager.GetString("InvalidCallOrder", resourceCulture); + return ResourceManager.GetString("InvalidFido2Info", resourceCulture); } } - internal static string CryptographyProviderFailure { + /// + /// Looks up a localized string similar to A FIDO2 PIN has a minimum Unicode code point count and must be a UTF-8 encoding of no more than 63 bytes.. + /// + internal static string InvalidFido2Pin { get { - return ResourceManager.GetString("CryptographyProviderFailure", resourceCulture); + return ResourceManager.GetString("InvalidFido2Pin", resourceCulture); } } - internal static string Fido2ResponseMissing { + /// + /// Looks up a localized string similar to Incorrect host challenge length.. + /// + internal static string InvalidHostChallengeLength { get { - return ResourceManager.GetString("Fido2ResponseMissing", resourceCulture); + return ResourceManager.GetString("InvalidHostChallengeLength", resourceCulture); } } - internal static string BadFido2Status { + /// + /// Looks up a localized string similar to Initial moving factor must be between 0 and 0xffff0 (1,048,560) and be divisable by 0x10 (16).. + /// + internal static string InvalidImfValue { get { - return ResourceManager.GetString("BadFido2Status", resourceCulture); + return ResourceManager.GetString("InvalidImfValue", resourceCulture); } } - internal static string NoInterfaceAvailable { + /// + /// Looks up a localized string similar to Bad response to InitializeUpdate.. + /// + internal static string InvalidInitializeUpdateResponse { get { - return ResourceManager.GetString("NoInterfaceAvailable", resourceCulture); + return ResourceManager.GetString("InvalidInitializeUpdateResponse", resourceCulture); } } - internal static string OtpFlagConflict { + /// + /// Looks up a localized string similar to A YubiOTP APDU was received with instruction number {0}. This instruction is not supported.. + /// + internal static string InvalidKeyboardInstruction { get { - return ResourceManager.GetString("OtpFlagConflict", resourceCulture); + return ResourceManager.GetString("InvalidKeyboardInstruction", resourceCulture); } } - internal static string OtpFlagRequiredOr { + /// + /// Looks up a localized string similar to The NDEF configuration data is not formed correctly.. + /// + internal static string InvalidNdefConfig { get { - return ResourceManager.GetString("OtpFlagRequiredOr", resourceCulture); + return ResourceManager.GetString("InvalidNdefConfig", resourceCulture); } } - internal static string InvalidPropertyLength { + /// + /// Looks up a localized string similar to A password cannot be null or empty.. + /// + internal static string InvalidOathPassword { get { - return ResourceManager.GetString("InvalidPropertyLength", resourceCulture); + return ResourceManager.GetString("InvalidOathPassword", resourceCulture); } } - internal static string PropertyValueTooLarge { + /// + /// Looks up a localized string similar to The challenge / response algorithm specified is invalid.. + /// + internal static string InvalidOtpChallengeResponseAlgorithm { get { - return ResourceManager.GetString("PropertyValueTooLarge", resourceCulture); + return ResourceManager.GetString("InvalidOtpChallengeResponseAlgorithm", resourceCulture); } } - internal static string UnexpectedState { + /// + /// Looks up a localized string similar to Invalid OTP slot.. + /// + internal static string InvalidOtpSlot { get { - return ResourceManager.GetString("UnexpectedState", resourceCulture); + return ResourceManager.GetString("InvalidOtpSlot", resourceCulture); } } - internal static string OtpConfigFlagsNotUpdatable { + /// + /// Looks up a localized string similar to Given the offset, the length of the output buffer was not valid.. + /// + internal static string InvalidOutputBuffer { get { - return ResourceManager.GetString("OtpConfigFlagsNotUpdatable", resourceCulture); + return ResourceManager.GetString("InvalidOutputBuffer", resourceCulture); } } - internal static string BadNdefRecordType { + /// + /// Looks up a localized string similar to Invalid padding.. + /// + internal static string InvalidPadding { get { - return ResourceManager.GetString("BadNdefRecordType", resourceCulture); + return ResourceManager.GetString("InvalidPadding", resourceCulture); } } - internal static string MalformedNdefRecord { + /// + /// Looks up a localized string similar to A PIN cannot be null or empty.. + /// + internal static string InvalidPin { get { - return ResourceManager.GetString("MalformedNdefRecord", resourceCulture); + return ResourceManager.GetString("InvalidPin", resourceCulture); } } - internal static string OutOfRangeUriPrefixCode { + /// + /// Looks up a localized string similar to A PIN must be 6 to 32 bytes long.. + /// + internal static string InvalidPinLength { get { - return ResourceManager.GetString("OutOfRangeUriPrefixCode", resourceCulture); + return ResourceManager.GetString("InvalidPinLength", resourceCulture); } } - internal static string WrongNdefType { + /// + /// Looks up a localized string similar to A PIN or PUK must be 6, 7, or 8 characters long.. + /// + internal static string InvalidPinPukLength { get { - return ResourceManager.GetString("WrongNdefType", resourceCulture); + return ResourceManager.GetString("InvalidPinPukLength", resourceCulture); } } - internal static string InvalidFido2Info { + /// + /// Looks up a localized string similar to A PIN or PUK retry count must be greater than 0 and less than 256.. + /// + internal static string InvalidPinPukRetryCount { get { - return ResourceManager.GetString("InvalidFido2Info", resourceCulture); + return ResourceManager.GetString("InvalidPinPukRetryCount", resourceCulture); } } - internal static string UnknownFido2Status { + /// + /// Looks up a localized string similar to The supplied data for a PIV Data Object was an invalid length.. + /// + internal static string InvalidPivDataObjectLength { get { - return ResourceManager.GetString("UnknownFido2Status", resourceCulture); + return ResourceManager.GetString("InvalidPivDataObjectLength", resourceCulture); } } - internal static string InvalidFido2Pin { + /// + /// Looks up a localized string similar to The supplied data for a PIV Data Object was invalid.. + /// + internal static string InvalidPivDataObjectValue { get { - return ResourceManager.GetString("InvalidFido2Pin", resourceCulture); + return ResourceManager.GetString("InvalidPivDataObjectValue", resourceCulture); } } - internal static string InvalidFido2Authentication { + /// + /// Looks up a localized string similar to Invalid PIN-only mode to set a YubiKey. Only None, PinProtected, or PinDerived are allowed.. + /// + internal static string InvalidPivPinOnlyMode { get { - return ResourceManager.GetString("InvalidFido2Authentication", resourceCulture); + return ResourceManager.GetString("InvalidPivPinOnlyMode", resourceCulture); } } - internal static string Ctap2CommandTooLarge { + /// + /// Looks up a localized string similar to The length of input to a Put Data operation, {0}, was invalid, the maximum is {1}.. + /// + internal static string InvalidPivPutDataLength { get { - return ResourceManager.GetString("Ctap2CommandTooLarge", resourceCulture); + return ResourceManager.GetString("InvalidPivPutDataLength", resourceCulture); } } - internal static string Ctap2MalformedResponse { + /// + /// Looks up a localized string similar to The data does not match a supported private key format.. + /// + internal static string InvalidPrivateKeyData { get { - return ResourceManager.GetString("Ctap2MalformedResponse", resourceCulture); + return ResourceManager.GetString("InvalidPrivateKeyData", resourceCulture); } } - internal static string Ctap2UnknownAttestationFormat { + /// + /// Looks up a localized string similar to The {0} property must be exactly {1} bytes long. Only {2} bytes were given.. + /// + internal static string InvalidPropertyLength { get { - return ResourceManager.GetString("Ctap2UnknownAttestationFormat", resourceCulture); + return ResourceManager.GetString("InvalidPropertyLength", resourceCulture); } } - internal static string FailedParsingCertificate { + /// + /// Looks up a localized string similar to The data does not match a supported public key format.. + /// + internal static string InvalidPublicKeyData { get { - return ResourceManager.GetString("FailedParsingCertificate", resourceCulture); + return ResourceManager.GetString("InvalidPublicKeyData", resourceCulture); } } - internal static string InvalidOtpChallengeResponseAlgorithm { + /// + /// Looks up a localized string similar to The length of a supplied salt was not valid for the usage.. + /// + internal static string InvalidSaltLength { get { - return ResourceManager.GetString("InvalidOtpChallengeResponseAlgorithm", resourceCulture); + return ResourceManager.GetString("InvalidSaltLength", resourceCulture); } } - internal static string HmacChallengeTooLong { + /// + /// Looks up a localized string similar to Keyboard layout [{0}] doesn't have a scancode for [{1}].. + /// + internal static string InvalidScancode { get { - return ResourceManager.GetString("HmacChallengeTooLong", resourceCulture); + return ResourceManager.GetString("InvalidScancode", resourceCulture); } } - internal static string YubicoOtpChallengeLengthInvalid { + /// + /// Looks up a localized string similar to Invalid SCP03 Key Version Number.. + /// + internal static string InvalidScp03Kvn { get { - return ResourceManager.GetString("YubicoOtpChallengeLengthInvalid", resourceCulture); + return ResourceManager.GetString("InvalidScp03Kvn", resourceCulture); } } - internal static string WrongHidCodeMapLength { + /// + /// Looks up a localized string similar to Slot number {0:X2} is not valid for the given operation on the given YubiKey.. + /// + internal static string InvalidSlot { get { - return ResourceManager.GetString("WrongHidCodeMapLength", resourceCulture); + return ResourceManager.GetString("InvalidSlot", resourceCulture); } } - internal static string LockCodeWrongLength { + /// + /// Looks up a localized string similar to Source and destination slots cannot be the same.. + /// + internal static string InvalidSlotsSameSourceAndDestinationSlotsCannotBeTheSame { get { - return ResourceManager.GetString("LockCodeWrongLength", resourceCulture); + return ResourceManager.GetString("InvalidSlotsSameSourceAndDestinationSlotsCannotBeTheSame", resourceCulture); } } - internal static string NdefTextTooLong { + /// + /// Looks up a localized string similar to The status report must be the first and only report returned by the YubiKey.. + /// + internal static string InvalidStatusReport { get { - return ResourceManager.GetString("NdefTextTooLong", resourceCulture); + return ResourceManager.GetString("InvalidStatusReport", resourceCulture); } } - internal static string NdefUriTooLong { + /// + /// Looks up a localized string similar to Invalid status word "{0}". For this method, the status word must be NoPreciseDiagnosis (0x6F 00).. + /// + internal static string InvalidStatusWordMustBeNoPreciseDiagnosis { get { - return ResourceManager.GetString("NdefUriTooLong", resourceCulture); + return ResourceManager.GetString("InvalidStatusWordMustBeNoPreciseDiagnosis", resourceCulture); } } - internal static string InvalidNdefConfig { + /// + /// Looks up a localized string similar to The string must have a minimum length of {0}, and a maximum of {1}. Actual length: {2}.. + /// + internal static string InvalidStringLength { get { - return ResourceManager.GetString("InvalidNdefConfig", resourceCulture); + return ResourceManager.GetString("InvalidStringLength", resourceCulture); } } - internal static string NdefLanguageCodeTooLong { + /// + /// Looks up a localized string similar to The temporary PIN length is invalid.. + /// + internal static string InvalidTemporaryPinLength { get { - return ResourceManager.GetString("NdefLanguageCodeTooLong", resourceCulture); + return ResourceManager.GetString("InvalidTemporaryPinLength", resourceCulture); } } - internal static string InvalidPin { + /// + /// Looks up a localized string similar to The U2F HID error code should be 1 byte long. The supplied error code contains {0} bytes.. + /// + internal static string InvalidU2fHidErrorCodeLength { get { - return ResourceManager.GetString("InvalidPin", resourceCulture); + return ResourceManager.GetString("InvalidU2fHidErrorCodeLength", resourceCulture); } } - internal static string InvalidPinLength { + /// + /// Looks up a localized string similar to A URI path cannot be null or empty.. + /// + internal static string InvalidUriPath { get { - return ResourceManager.GetString("InvalidPinLength", resourceCulture); + return ResourceManager.GetString("InvalidUriPath", resourceCulture); } } - internal static string SmartCardPipelineSetupFailed { + /// + /// Looks up a localized string similar to The URI query cannot be null or empty.. + /// + internal static string InvalidUriQuery { get { - return ResourceManager.GetString("SmartCardPipelineSetupFailed", resourceCulture); + return ResourceManager.GetString("InvalidUriQuery", resourceCulture); } } - internal static string InvalidCredentialType { + /// + /// Looks up a localized string similar to The URI scheme must be 'otpauth://'.. + /// + internal static string InvalidUriScheme { get { - return ResourceManager.GetString("InvalidCredentialType", resourceCulture); + return ResourceManager.GetString("InvalidUriScheme", resourceCulture); } } - internal static string InvalidKeyboardInstruction { + /// + /// Looks up a localized string similar to Cannot request temporary pin when doing check-only verification.. + /// + internal static string InvalidVerifyUvArguments { get { - return ResourceManager.GetString("InvalidKeyboardInstruction", resourceCulture); + return ResourceManager.GetString("InvalidVerifyUvArguments", resourceCulture); } } + /// + /// Looks up a localized string similar to The keyboard connection does not support writing more than 64 bytes to the device.. + /// internal static string KeyboardDataTooBig { get { return ResourceManager.GetString("KeyboardDataTooBig", resourceCulture); } } + /// + /// Looks up a localized string similar to The flag {0} is not a valid keyboard report flag.. + /// internal static string KeyboardInvalidFlag { get { return ResourceManager.GetString("KeyboardInvalidFlag", resourceCulture); } } + /// + /// Looks up a localized string similar to Tried writing a keyboard report and unexpectedly recieved no reply.. + /// internal static string KeyboardNoReply { get { return ResourceManager.GetString("KeyboardNoReply", resourceCulture); } } + /// + /// Looks up a localized string similar to Attempted to read a status keyboard report and failed.. + /// internal static string KeyboardReadReportFailed { get { return ResourceManager.GetString("KeyboardReadReportFailed", resourceCulture); } } + /// + /// Looks up a localized string similar to The sequence number {0} is outside the range of allowed values.. + /// internal static string KeyboardSequenceOutOfRange { get { return ResourceManager.GetString("KeyboardSequenceOutOfRange", resourceCulture); } } + /// + /// Looks up a localized string similar to The YubiKey did not acknowledge a write to the keyboard interface within the alloted time.. + /// internal static string KeyboardTimeout { get { return ResourceManager.GetString("KeyboardTimeout", resourceCulture); } } + /// + /// Looks up a localized string similar to Expected to read another keyboard report, but that failed. UnexpectedEOR = {0}, WaitingForTouch = {1}. + /// internal static string KeyboardUnexpectedEndOfBuffer { get { return ResourceManager.GetString("KeyboardUnexpectedEndOfBuffer", resourceCulture); } } - internal static string UserInteractionTimeout { - get { - return ResourceManager.GetString("UserInteractionTimeout", resourceCulture); - } - } - - internal static string InvalidDeviceNotYubico { + /// + /// Looks up a localized string similar to The YubiKey has no visible serial number. Either API visibility is disabled or the YubiKey does not have a serial number.. + /// + internal static string KeyHasNoVisibleSerial { get { - return ResourceManager.GetString("InvalidDeviceNotYubico", resourceCulture); + return ResourceManager.GetString("KeyHasNoVisibleSerial", resourceCulture); } } - internal static string InvalidConnectionTypeNone { + /// + /// Looks up a localized string similar to The key must be set either explicitly or by specifying that it should be generated before it can be read.. + /// + internal static string KeyNotSet { get { - return ResourceManager.GetString("InvalidConnectionTypeNone", resourceCulture); + return ResourceManager.GetString("KeyNotSet", resourceCulture); } } - internal static string NotImplementedHidFidoEnumeration { + /// + /// Looks up a localized string similar to SCP03 handshake called out-of-order: loading an external authenticate response before processing the preceding initialize update response is not possible.. + /// + internal static string LoadExternalAuthenticateResponsePriorToLoadInitializUpdateResponse { get { - return ResourceManager.GetString("NotImplementedHidFidoEnumeration", resourceCulture); + return ResourceManager.GetString("LoadExternalAuthenticateResponsePriorToLoadInitializUpdateResponse", resourceCulture); } } - internal static string HidFidoWindowsNotElevated { + /// + /// Looks up a localized string similar to SCP03 handshake called out-of-order: loading the response to an initialize update command before building it is not possible.. + /// + internal static string LoadInitializeUpdatePriorToBuild { get { - return ResourceManager.GetString("HidFidoWindowsNotElevated", resourceCulture); + return ResourceManager.GetString("LoadInitializeUpdatePriorToBuild", resourceCulture); } } - internal static string InvalidDeviceNotFido { + /// + /// Looks up a localized string similar to The configuration lock code cannot be set to all zeros.. + /// + internal static string LockCodeAllZeroNotAllowed { get { - return ResourceManager.GetString("InvalidDeviceNotFido", resourceCulture); + return ResourceManager.GetString("LockCodeAllZeroNotAllowed", resourceCulture); } } - internal static string InvalidDeviceNotKeyboard { + /// + /// Looks up a localized string similar to The lock code must be {0}-bytes. {1} bytes were specified.. + /// + internal static string LockCodeWrongLength { get { - return ResourceManager.GetString("InvalidDeviceNotKeyboard", resourceCulture); + return ResourceManager.GetString("LockCodeWrongLength", resourceCulture); } } - internal static string InvalidStatusReport { + /// + /// Looks up a localized string similar to The NDEF record is malformed. Contact Yubico Support if this error persists.. + /// + internal static string MalformedNdefRecord { get { - return ResourceManager.GetString("InvalidStatusReport", resourceCulture); + return ResourceManager.GetString("MalformedNdefRecord", resourceCulture); } } - internal static string StatusReportNotFirstReportRead { + /// + /// Looks up a localized string similar to Cannot open the management application.. + /// + internal static string ManagementApplicationUnavailable { get { - return ResourceManager.GetString("StatusReportNotFirstReportRead", resourceCulture); + return ResourceManager.GetString("ManagementApplicationUnavailable", resourceCulture); } } - internal static string ArgumentMustBeFirmwareVersion { + /// + /// Looks up a localized string similar to The YubiKey is configured for PIN-only, so the management key cannot be changed.. + /// + internal static string MgmtKeyCannotBeChanged { get { - return ResourceManager.GetString("ArgumentMustBeFirmwareVersion", resourceCulture); + return ResourceManager.GetString("MgmtKeyCannotBeChanged", resourceCulture); } } - internal static string OtpFlagsNotValid { + /// + /// Looks up a localized string similar to A required property was missing for CTAP2.. + /// + internal static string MissingCtap2Data { get { - return ResourceManager.GetString("OtpFlagsNotValid", resourceCulture); + return ResourceManager.GetString("MissingCtap2Data", resourceCulture); } } - internal static string StaticTicketNotSettable { + /// + /// Looks up a localized string similar to A KeyCollector delegate is needed but not supplied.. + /// + internal static string MissingKeyCollector { get { - return ResourceManager.GetString("StaticTicketNotSettable", resourceCulture); + return ResourceManager.GetString("MissingKeyCollector", resourceCulture); } } - internal static string InvalidScancode { + /// + /// Looks up a localized string similar to A required salt was missing.. + /// + internal static string MissingSalt { get { - return ResourceManager.GetString("InvalidScancode", resourceCulture); + return ResourceManager.GetString("MissingSalt", resourceCulture); } } - internal static string UnableToVerifyOathPassword { + /// + /// Looks up a localized string similar to Multiple exceptions encountered. See inner exceptions for details.. + /// + internal static string MultipleExceptions { get { - return ResourceManager.GetString("UnableToVerifyOathPassword", resourceCulture); + return ResourceManager.GetString("MultipleExceptions", resourceCulture); } } - internal static string IncorrectOathNewPassword { + /// + /// Looks up a localized string similar to To use the YubiKey serial number as the public ID, the Memory<byte> collection must be exactly six bytes.. + /// + internal static string MustBeSixBytesForSerial { get { - return ResourceManager.GetString("IncorrectOathNewPassword", resourceCulture); + return ResourceManager.GetString("MustBeSixBytesForSerial", resourceCulture); } } - internal static string OtpFlagRequired { + /// + /// Looks up a localized string similar to You must choose either the HMAC-SHA1 or Yubico OTP algorithm for the challenge response.. + /// + internal static string MustChooseAlgorithm { get { - return ResourceManager.GetString("OtpFlagRequired", resourceCulture); + return ResourceManager.GetString("MustChooseAlgorithm", resourceCulture); } } - internal static string OtpFlagRequiredAnd { + /// + /// Looks up a localized string similar to You must either specify or choose to generate a key.. + /// + internal static string MustChooseOrGenerateKey { get { - return ResourceManager.GetString("OtpFlagRequiredAnd", resourceCulture); + return ResourceManager.GetString("MustChooseOrGenerateKey", resourceCulture); } } - internal static string SHA512NotSupported { + /// + /// Looks up a localized string similar to You must either specify or choose to generate a private ID.. + /// + internal static string MustChooseOrGeneratePrivateId { get { - return ResourceManager.GetString("SHA512NotSupported", resourceCulture); + return ResourceManager.GetString("MustChooseOrGeneratePrivateId", resourceCulture); } } - internal static string TouchNotSupported { + /// + /// Looks up a localized string similar to You must either specify a value or choose to use the YubiKey serial number as a public ID.. + /// + internal static string MustChooseOrUseSerialAsPublicId { get { - return ResourceManager.GetString("TouchNotSupported", resourceCulture); + return ResourceManager.GetString("MustChooseOrUseSerialAsPublicId", resourceCulture); } } - internal static string RenameCommandNotSupported { + /// + /// Looks up a localized string similar to You must specify either TOTP or a challenge.. + /// + internal static string MustChooseTotpOrChallenge { get { - return ResourceManager.GetString("RenameCommandNotSupported", resourceCulture); + return ResourceManager.GetString("MustChooseTotpOrChallenge", resourceCulture); } } + /// + /// Looks up a localized string similar to At least one available USB capability must be enabled.. + /// internal static string MustEnableOneAvailableUsbCapability { get { return ResourceManager.GetString("MustEnableOneAvailableUsbCapability", resourceCulture); } } - internal static string AccessCodeTooLong { + /// + /// Looks up a localized string similar to At least one USB interface must be enabled.. + /// + internal static string MustEnableOneAvailableUsbInterface { get { - return ResourceManager.GetString("AccessCodeTooLong", resourceCulture); + return ResourceManager.GetString("MustEnableOneAvailableUsbInterface", resourceCulture); } } - internal static string BothGenerateAndSpecify { + /// + /// Looks up a localized string similar to You must specify a keyboard layout to configure a static password.. + /// + internal static string MustSpecifyKeyboardLayout { get { - return ResourceManager.GetString("BothGenerateAndSpecify", resourceCulture); + return ResourceManager.GetString("MustSpecifyKeyboardLayout", resourceCulture); } } - internal static string SlotNotSet { + /// + /// Looks up a localized string similar to You must either supply a static password or specify that one should be generated.. + /// + internal static string MustSpecifyOrGeneratePassword { get { - return ResourceManager.GetString("SlotNotSet", resourceCulture); + return ResourceManager.GetString("MustSpecifyOrGeneratePassword", resourceCulture); } } - internal static string StaticPasswordInvalidLength { + /// + /// Looks up a localized string similar to The NDEF language code is too long.. + /// + internal static string NdefLanguageCodeTooLong { get { - return ResourceManager.GetString("StaticPasswordInvalidLength", resourceCulture); + return ResourceManager.GetString("NdefLanguageCodeTooLong", resourceCulture); } } - internal static string LockCodeAllZeroNotAllowed { + /// + /// Looks up a localized string similar to The value and languageCode specified must fit within a buffer of less than {0} bytes. It requires {1} bytes in total, with value requiring {2} bytes, and languageCode requiring {3} bytes.. + /// + internal static string NdefTextTooLong { get { - return ResourceManager.GetString("LockCodeAllZeroNotAllowed", resourceCulture); + return ResourceManager.GetString("NdefTextTooLong", resourceCulture); } } - internal static string AutoEjectTimeoutRequiresTouchEjectEnabled { + /// + /// Looks up a localized string similar to The uri specified must fit within a buffer of less than {0} bytes. The length is {1} after matching with a prefix code of {2}.. + /// + internal static string NdefUriTooLong { get { - return ResourceManager.GetString("AutoEjectTimeoutRequiresTouchEjectEnabled", resourceCulture); + return ResourceManager.GetString("NdefUriTooLong", resourceCulture); } } - internal static string SupportsOnlyUsbInterfaces { + /// + /// Looks up a localized string similar to No active connections for that YubiKey were found.. + /// + internal static string NoActiveConnections { get { - return ResourceManager.GetString("SupportsOnlyUsbInterfaces", resourceCulture); + return ResourceManager.GetString("NoActiveConnections", resourceCulture); } } - internal static string TouchEjectTimeoutRequiresCcidOnly { + /// + /// Looks up a localized string similar to No PIN protocol is currently in use.. + /// + internal static string NoActivePinProtocol { get { - return ResourceManager.GetString("TouchEjectTimeoutRequiresCcidOnly", resourceCulture); + return ResourceManager.GetString("NoActivePinProtocol", resourceCulture); } } - internal static string MustEnableOneAvailableUsbInterface { + /// + /// Looks up a localized string similar to There is no data to encode.. + /// + internal static string NoDataToEncode { get { - return ResourceManager.GetString("MustEnableOneAvailableUsbInterface", resourceCulture); + return ResourceManager.GetString("NoDataToEncode", resourceCulture); } } - internal static string YubiKeyOperationFailed { + /// + /// Looks up a localized string similar to There is no YubiKey interface available to communicate with the requested application.. + /// + internal static string NoInterfaceAvailable { get { - return ResourceManager.GetString("YubiKeyOperationFailed", resourceCulture); + return ResourceManager.GetString("NoInterfaceAvailable", resourceCulture); } } - internal static string OtpSwapCommandNotSupported { + /// + /// Looks up a localized string similar to There are no retries remaining for a PIN, PUK, or other authentication element.. + /// + internal static string NoMoreRetriesRemaining { get { - return ResourceManager.GetString("OtpSwapCommandNotSupported", resourceCulture); + return ResourceManager.GetString("NoMoreRetriesRemaining", resourceCulture); } } - internal static string OtpSlotsNotConfigured { + /// + /// Looks up a localized string similar to Response data is not available as the ResponseApdu has indicated a failure. Check the SW property or call ThrowIfFailed for more information.. + /// + internal static string NoResponseDataApduFailed { get { - return ResourceManager.GetString("OtpSlotsNotConfigured", resourceCulture); + return ResourceManager.GetString("NoResponseDataApduFailed", resourceCulture); } } - internal static string BothTotpAndChallenge { + /// + /// Looks up a localized string similar to Enumeration of ConnectionType.HidFido devices is not implemented.. + /// + internal static string NotImplementedHidFidoEnumeration { get { - return ResourceManager.GetString("BothTotpAndChallenge", resourceCulture); + return ResourceManager.GetString("NotImplementedHidFidoEnumeration", resourceCulture); } } - internal static string MustChooseTotpOrChallenge { + /// + /// Looks up a localized string similar to This operation is not supported by this version of YubiKey.. + /// + internal static string NotSupportedByYubiKeyVersion { get { - return ResourceManager.GetString("MustChooseTotpOrChallenge", resourceCulture); + return ResourceManager.GetString("NotSupportedByYubiKeyVersion", resourceCulture); } } + /// + /// Looks up a localized string similar to You must choose either Yubico OTP or HMAC-SHA1, but not both.. + /// internal static string OnlyOneAlgorithm { get { return ResourceManager.GetString("OnlyOneAlgorithm", resourceCulture); } } - internal static string CantSpecifyPrivateIdAndGenerate { - get { - return ResourceManager.GetString("CantSpecifyPrivateIdAndGenerate", resourceCulture); - } - } - - internal static string CantSpecifyPublicIdAndUseSerial { - get { - return ResourceManager.GetString("CantSpecifyPublicIdAndUseSerial", resourceCulture); - } - } - - internal static string KeyHasNoVisibleSerial { + /// + /// Looks up a localized string similar to The user cancelled the operation.. + /// + internal static string OperationCancelled { get { - return ResourceManager.GetString("KeyHasNoVisibleSerial", resourceCulture); + return ResourceManager.GetString("OperationCancelled", resourceCulture); } } - internal static string MultipleExceptions { + /// + /// Looks up a localized string similar to Attempted to perform command encoding or response decoding prior to loading the response to initialize update.. + /// + internal static string OperationPriorToLoadInitializeUpdate { get { - return ResourceManager.GetString("MultipleExceptions", resourceCulture); + return ResourceManager.GetString("OperationPriorToLoadInitializeUpdate", resourceCulture); } } - internal static string MustChooseOrGeneratePrivateId { + /// + /// Looks up a localized string similar to An OTP code must be between 6 and 10 digits.. + /// + internal static string OtpCodeDigitRange { get { - return ResourceManager.GetString("MustChooseOrGeneratePrivateId", resourceCulture); + return ResourceManager.GetString("OtpCodeDigitRange", resourceCulture); } } - internal static string MustChooseOrUseSerialAsPublicId { + /// + /// Looks up a localized string similar to There are values set as ConfigurationFlags that are not valid.. + /// + internal static string OtpConfigFlagsInvalid { get { - return ResourceManager.GetString("MustChooseOrUseSerialAsPublicId", resourceCulture); + return ResourceManager.GetString("OtpConfigFlagsInvalid", resourceCulture); } } - internal static string MustChooseOrGenerateKey { + /// + /// Looks up a localized string similar to One or more flags specified are not allowed to be updated.. + /// + internal static string OtpConfigFlagsNotUpdatable { get { - return ResourceManager.GetString("MustChooseOrGenerateKey", resourceCulture); + return ResourceManager.GetString("OtpConfigFlagsNotUpdatable", resourceCulture); } } - internal static string PrivateIdWrongSize { + /// + /// Looks up a localized string similar to There are values set as ExtendedFlags that are not valid.. + /// + internal static string OtpExtendedFlagsInvalid { get { - return ResourceManager.GetString("PrivateIdWrongSize", resourceCulture); + return ResourceManager.GetString("OtpExtendedFlagsInvalid", resourceCulture); } } - internal static string PublicIdWrongSize { + /// + /// Looks up a localized string similar to Conflicting OTP configuration flags: {0} cannot be set with {1}.. + /// + internal static string OtpFlagConflict { get { - return ResourceManager.GetString("PublicIdWrongSize", resourceCulture); + return ResourceManager.GetString("OtpFlagConflict", resourceCulture); } } - internal static string YubicoKeyWrongSize { + /// + /// Looks up a localized string similar to The {0} flag requires the {1} flag to also be set.. + /// + internal static string OtpFlagRequired { get { - return ResourceManager.GetString("YubicoKeyWrongSize", resourceCulture); + return ResourceManager.GetString("OtpFlagRequired", resourceCulture); } } - internal static string MustChooseAlgorithm { + /// + /// Looks up a localized string similar to The {0} flag requires all of the {1} flag to also be set.. + /// + internal static string OtpFlagRequiredAnd { get { - return ResourceManager.GetString("MustChooseAlgorithm", resourceCulture); + return ResourceManager.GetString("OtpFlagRequiredAnd", resourceCulture); } } - internal static string CantSpecifyKeyAndGenerate { + /// + /// Looks up a localized string similar to The {0} flag requires at least one of the flags {1} to also be set.. + /// + internal static string OtpFlagRequiredOr { get { - return ResourceManager.GetString("CantSpecifyKeyAndGenerate", resourceCulture); + return ResourceManager.GetString("OtpFlagRequiredOr", resourceCulture); } } - internal static string PrivateIdNotSet { + /// + /// Looks up a localized string similar to The value given to GetYubiKeyFlags is not a valid OtpFlags value.. + /// + internal static string OtpFlagsNotValid { get { - return ResourceManager.GetString("PrivateIdNotSet", resourceCulture); + return ResourceManager.GetString("OtpFlagsNotValid", resourceCulture); } } - internal static string PublicIdNotSet { + /// + /// Looks up a localized string similar to The language code is invalid.. + /// + internal static string OtpNdefInvalidLanguageCode { get { - return ResourceManager.GetString("PublicIdNotSet", resourceCulture); + return ResourceManager.GetString("OtpNdefInvalidLanguageCode", resourceCulture); } } - internal static string KeyNotSet { + /// + /// Looks up a localized string similar to An NDEF slot must be programmed as text or as a URI. Neither of these were specified.. + /// + internal static string OtpNdefNoTypeChosen { get { - return ResourceManager.GetString("KeyNotSet", resourceCulture); + return ResourceManager.GetString("OtpNdefNoTypeChosen", resourceCulture); } } - internal static string AlgorithmNotChosen { + /// + /// Looks up a localized string similar to Specifying UTF-16 encoding or a language code does not have any effect when programming a URI into the NDEF slot.. + /// + internal static string OtpNdefPropertiesHaveNoEffect { get { - return ResourceManager.GetString("AlgorithmNotChosen", resourceCulture); + return ResourceManager.GetString("OtpNdefPropertiesHaveNoEffect", resourceCulture); } } - internal static string HmacKeyWrongSize { + /// + /// Looks up a localized string similar to Unable to select the NDEF file record. {0}. + /// + internal static string OtpNdefSelectFileFailed { get { - return ResourceManager.GetString("HmacKeyWrongSize", resourceCulture); + return ResourceManager.GetString("OtpNdefSelectFileFailed", resourceCulture); } } - internal static string IntOrCodeOnlyWithHmac { + /// + /// Looks up a localized string similar to An NDEF configuration cannot contain both both text and a URI.. + /// + internal static string OtpNdefTypeConflict { get { - return ResourceManager.GetString("IntOrCodeOnlyWithHmac", resourceCulture); + return ResourceManager.GetString("OtpNdefTypeConflict", resourceCulture); } } - internal static string OtpCodeDigitRange { + /// + /// Looks up a localized string similar to The command cannot be performed because none of the slots are configured.. + /// + internal static string OtpSlotsNotConfigured { get { - return ResourceManager.GetString("OtpCodeDigitRange", resourceCulture); + return ResourceManager.GetString("OtpSlotsNotConfigured", resourceCulture); } } - internal static string YubicoOtpNotCompatible { + /// + /// Looks up a localized string similar to Swapping OTP slot configurations is not supported on YubiKeys with firmware version less than 2.3.2.. + /// + internal static string OtpSwapCommandNotSupported { get { - return ResourceManager.GetString("YubicoOtpNotCompatible", resourceCulture); + return ResourceManager.GetString("OtpSwapCommandNotSupported", resourceCulture); } } - internal static string InvalidImfValue { + /// + /// Looks up a localized string similar to There are values set as TicketFlags that are not valid.. + /// + internal static string OtpTicketFlagsInvalid { get { - return ResourceManager.GetString("InvalidImfValue", resourceCulture); + return ResourceManager.GetString("OtpTicketFlagsInvalid", resourceCulture); } } - internal static string RequiresNfc { + /// + /// Looks up a localized string similar to The prefix code specified in the NDEF record is not valid. Prefix codes are between 0 and 35.. + /// + internal static string OutOfRangeUriPrefixCode { get { - return ResourceManager.GetString("RequiresNfc", resourceCulture); + return ResourceManager.GetString("OutOfRangeUriPrefixCode", resourceCulture); } } - internal static string OtpNdefSelectFileFailed { + /// + /// Looks up a localized string similar to The password is not set yet. You should execute the operation before attempting to retrieve the password.. + /// + internal static string PasswordNotSetYet { get { - return ResourceManager.GetString("OtpNdefSelectFileFailed", resourceCulture); + return ResourceManager.GetString("PasswordNotSetYet", resourceCulture); } } - internal static string CantDeleteEmptySlot { + /// + /// Looks up a localized string similar to The PIN has already been set and cannot be changed using this function.. + /// + internal static string PinAlreadySet { get { - return ResourceManager.GetString("CantDeleteEmptySlot", resourceCulture); + return ResourceManager.GetString("PinAlreadySet", resourceCulture); } } - internal static string OtpNdefPropertiesHaveNoEffect { + /// + /// Looks up a localized string similar to The user cancelled the PIN collection operation.. + /// + internal static string PinCollectionCancelled { get { - return ResourceManager.GetString("OtpNdefPropertiesHaveNoEffect", resourceCulture); + return ResourceManager.GetString("PinCollectionCancelled", resourceCulture); } } - internal static string OtpNdefNoTypeChosen { + /// + /// Looks up a localized string similar to The provided PIN or PUK value violates current complexity conditions.. + /// + internal static string PinComplexityViolation { get { - return ResourceManager.GetString("OtpNdefNoTypeChosen", resourceCulture); + return ResourceManager.GetString("PinComplexityViolation", resourceCulture); } } - internal static string OtpNdefTypeConflict { + /// + /// Looks up a localized string similar to The YubiKey is configured for something incompatible with PIN-only.. + /// + internal static string PinOnlyNotPossible { get { - return ResourceManager.GetString("OtpNdefTypeConflict", resourceCulture); + return ResourceManager.GetString("PinOnlyNotPossible", resourceCulture); } } - internal static string OtpNdefInvalidLanguageCode { + /// + /// Looks up a localized string similar to The PIN protocol {0} is not supported.. + /// + internal static string PinProtocolNotSupported { get { - return ResourceManager.GetString("OtpNdefInvalidLanguageCode", resourceCulture); + return ResourceManager.GetString("PinProtocolNotSupported", resourceCulture); } } - internal static string PasswordNotSetYet { + /// + /// Looks up a localized string similar to The specified PIN was too long. It must be no more than {0} {1} long. It was {2} {1}.. + /// + internal static string PinTooLong { get { - return ResourceManager.GetString("PasswordNotSetYet", resourceCulture); + return ResourceManager.GetString("PinTooLong", resourceCulture); } } - internal static string MustSpecifyOrGeneratePassword { + /// + /// Looks up a localized string similar to The specified PIN was too short. It must be at least {0} {1} long. It was {2} {1}.. + /// + internal static string PinTooShort { get { - return ResourceManager.GetString("MustSpecifyOrGeneratePassword", resourceCulture); + return ResourceManager.GetString("PinTooShort", resourceCulture); } } - internal static string MustSpecifyKeyboardLayout { + /// + /// Looks up a localized string similar to Unknown error when disposing PivSession. + /// + internal static string PivSessionDisposeUnknownError { get { - return ResourceManager.GetString("MustSpecifyKeyboardLayout", resourceCulture); + return ResourceManager.GetString("PivSessionDisposeUnknownError", resourceCulture); } } - internal static string MustBeSixBytesForSerial { + /// + /// Looks up a localized string similar to The private ID must be set either explicitly or by specifying that it should be generated before it can be read.. + /// + internal static string PrivateIdNotSet { get { - return ResourceManager.GetString("MustBeSixBytesForSerial", resourceCulture); + return ResourceManager.GetString("PrivateIdNotSet", resourceCulture); } } - internal static string ValueMustBeBetweenXandY { + /// + /// Looks up a localized string similar to The private identifier must be exactly 6 bytes.. + /// + internal static string PrivateIdWrongSize { get { - return ResourceManager.GetString("ValueMustBeBetweenXandY", resourceCulture); + return ResourceManager.GetString("PrivateIdWrongSize", resourceCulture); } } - internal static string DeviceDoesNotSupportApplication { + /// + /// Looks up a localized string similar to The {0} property can only be set to a maximum value of {1}. The value is {2}.. + /// + internal static string PropertyValueTooLarge { get { - return ResourceManager.GetString("DeviceDoesNotSupportApplication", resourceCulture); + return ResourceManager.GetString("PropertyValueTooLarge", resourceCulture); } } - internal static string DeviceTypeNotRecognized { + /// + /// Looks up a localized string similar to The public ID must be set either explicitly or by specifying to use serial number before it can be read.. + /// + internal static string PublicIdNotSet { get { - return ResourceManager.GetString("DeviceTypeNotRecognized", resourceCulture); + return ResourceManager.GetString("PublicIdNotSet", resourceCulture); } } - internal static string NoActiveConnections { + /// + /// Looks up a localized string similar to The public identifier must be between 1 and 16 bytes.. + /// + internal static string PublicIdWrongSize { get { - return ResourceManager.GetString("NoActiveConnections", resourceCulture); + return ResourceManager.GetString("PublicIdWrongSize", resourceCulture); } } - internal static string UnknownYubiKeyFeature { + /// + /// Looks up a localized string similar to Renaming a credential is not supported on YubiKeys with firmware version less than 5.3.0.. + /// + internal static string RenameCommandNotSupported { get { - return ResourceManager.GetString("UnknownYubiKeyFeature", resourceCulture); + return ResourceManager.GetString("RenameCommandNotSupported", resourceCulture); } } - internal static string YubiKeyNotFips { + /// + /// Looks up a localized string similar to This method can only be called on a YubiKey that is connected via NFC.. + /// + internal static string RequiresNfc { get { - return ResourceManager.GetString("YubiKeyNotFips", resourceCulture); + return ResourceManager.GetString("RequiresNfc", resourceCulture); } } - internal static string AlreadySet { + /// + /// Looks up a localized string similar to The retry count must be non-negative.. + /// + internal static string RetryCountNegative { get { - return ResourceManager.GetString("AlreadySet", resourceCulture); + return ResourceManager.GetString("RetryCountNegative", resourceCulture); } } - internal static string InvalidU2fHidErrorCodeLength { + /// + /// Looks up a localized string similar to An SCP03 StaticKeys object does not match an expected key set.. + /// + internal static string Scp03KeyMismatch { get { - return ResourceManager.GetString("InvalidU2fHidErrorCodeLength", resourceCulture); + return ResourceManager.GetString("Scp03KeyMismatch", resourceCulture); } } - internal static string InvalidStatusWordMustBeNoPreciseDiagnosis { + /// + /// Looks up a localized string similar to The HMAC-SHA512 algorithm is not supported on YubiKeys with firmware version less than 4.3.1.. + /// + internal static string SHA512NotSupported { get { - return ResourceManager.GetString("InvalidStatusWordMustBeNoPreciseDiagnosis", resourceCulture); + return ResourceManager.GetString("SHA512NotSupported", resourceCulture); } } - internal static string CannotMergeDifferentParents { + /// + /// Looks up a localized string similar to No YubiKey slot was set. You must select a slot to configure.. + /// + internal static string SlotNotSet { get { - return ResourceManager.GetString("CannotMergeDifferentParents", resourceCulture); + return ResourceManager.GetString("SlotNotSet", resourceCulture); } } - internal static string CborLengthMismatch { + /// + /// Looks up a localized string similar to Failed to select the smart card application. 0x{0:X4}. + /// + internal static string SmartCardPipelineSetupFailed { get { - return ResourceManager.GetString("CborLengthMismatch", resourceCulture); + return ResourceManager.GetString("SmartCardPipelineSetupFailed", resourceCulture); } } - internal static string CborWriterMustConvertIdenfiteLengths { + /// + /// Looks up a localized string similar to The static password length must be between 1 and {0} characters.. + /// + internal static string StaticPasswordInvalidLength { get { - return ResourceManager.GetString("CborWriterMustConvertIdenfiteLengths", resourceCulture); + return ResourceManager.GetString("StaticPasswordInvalidLength", resourceCulture); } } - internal static string CborMapEntriesExpected { + /// + /// Looks up a localized string similar to The StaticTicket flag cannot be changed in a StaticTicketFlags object.. + /// + internal static string StaticTicketNotSettable { get { - return ResourceManager.GetString("CborMapEntriesExpected", resourceCulture); + return ResourceManager.GetString("StaticTicketNotSettable", resourceCulture); } } - internal static string CborUnexpectedMapTag { + /// + /// Looks up a localized string similar to The status report must be the first report read by the KeyboardFrameReader.. + /// + internal static string StatusReportNotFirstReportRead { get { - return ResourceManager.GetString("CborUnexpectedMapTag", resourceCulture); + return ResourceManager.GetString("StatusReportNotFirstReportRead", resourceCulture); } } - internal static string Ctap2MissingRequiredField { + /// + /// Looks up a localized string similar to An input Stream was not readable.. + /// + internal static string StreamNotReadable { get { - return ResourceManager.GetString("Ctap2MissingRequiredField", resourceCulture); + return ResourceManager.GetString("StreamNotReadable", resourceCulture); } } - internal static string InvalidCredentialRetryDataLength { + /// + /// Looks up a localized string similar to Only USB interfaces are supported by this operation.. + /// + internal static string SupportsOnlyUsbInterfaces { get { - return ResourceManager.GetString("InvalidCredentialRetryDataLength", resourceCulture); + return ResourceManager.GetString("SupportsOnlyUsbInterfaces", resourceCulture); } } - internal static string RetryCountNegative { + /// + /// Looks up a localized string similar to Touch eject timeout requires the YubiKey to only have the CCID interface enabled.. + /// + internal static string TouchEjectTimeoutRequiresCcidOnly { get { - return ResourceManager.GetString("RetryCountNegative", resourceCulture); + return ResourceManager.GetString("TouchEjectTimeoutRequiresCcidOnly", resourceCulture); } } - internal static string InvalidStringLength { + /// + /// Looks up a localized string similar to The require touch property is not supported on YubiKeys with firmware version less than 4.2.4.. + /// + internal static string TouchNotSupported { get { - return ResourceManager.GetString("InvalidStringLength", resourceCulture); + return ResourceManager.GetString("TouchNotSupported", resourceCulture); } } - internal static string InvalidDataLength { + /// + /// Looks up a localized string similar to This command will block as it is requesting user presence (touch).. + /// + internal static string TouchRequired { get { - return ResourceManager.GetString("InvalidDataLength", resourceCulture); + return ResourceManager.GetString("TouchRequired", resourceCulture); } } - internal static string InvalidDataTag { + /// + /// Looks up a localized string similar to The Triple-DES operation failed.. + /// + internal static string TripleDesFailed { get { - return ResourceManager.GetString("InvalidDataTag", resourceCulture); + return ResourceManager.GetString("TripleDesFailed", resourceCulture); } } - internal static string YubiHsmAuthInvalidCredentialLabelLength { + /// + /// Looks up a localized string similar to The value is not of the expected type. This often indicates a bug in the SDK.. + /// + internal static string TypeMismatch { get { - return ResourceManager.GetString("YubiHsmAuthInvalidCredentialLabelLength", resourceCulture); + return ResourceManager.GetString("TypeMismatch", resourceCulture); } } - internal static string YubiHsmAuthInvalidEncSize { + /// + /// Looks up a localized string similar to Type not supported.. + /// + internal static string TypeNotSupported { get { - return ResourceManager.GetString("YubiHsmAuthInvalidEncSize", resourceCulture); + return ResourceManager.GetString("TypeNotSupported", resourceCulture); } } - internal static string YubiHsmAuthInvalidMacSize { + /// + /// Looks up a localized string similar to The verification of the current password failed.. + /// + internal static string UnableToVerifyOathPassword { get { - return ResourceManager.GetString("YubiHsmAuthInvalidMacSize", resourceCulture); + return ResourceManager.GetString("UnableToVerifyOathPassword", resourceCulture); } } - internal static string YubiHsmAuthInvalidPasswordLength { + /// + /// Looks up a localized string similar to Unexpected state encountered. This most likely indicates a bug in the SDK. Please report this exception to Yubico Support.. + /// + internal static string UnexpectedState { get { - return ResourceManager.GetString("YubiHsmAuthInvalidPasswordLength", resourceCulture); + return ResourceManager.GetString("UnexpectedState", resourceCulture); } } - internal static string YubiHsmAuthInvalidMgmtKeyLength { + /// + /// Looks up a localized string similar to An unknown error has occurred.. + /// + internal static string UnknownError { get { - return ResourceManager.GetString("YubiHsmAuthInvalidMgmtKeyLength", resourceCulture); + return ResourceManager.GetString("UnknownError", resourceCulture); } } - internal static string YubiHsmAuthKeyTypeNotSupported { + /// + /// Looks up a localized string similar to The authenticator returned an unknown FIDO2 status indicating an error.. + /// + internal static string UnknownFido2Status { get { - return ResourceManager.GetString("YubiHsmAuthKeyTypeNotSupported", resourceCulture); + return ResourceManager.GetString("UnknownFido2Status", resourceCulture); } } - internal static string OperationCancelled { + /// + /// Looks up a localized string similar to An unknown FIDO error has occurred.. + /// + internal static string UnknownFidoError { get { - return ResourceManager.GetString("OperationCancelled", resourceCulture); + return ResourceManager.GetString("UnknownFidoError", resourceCulture); } } - internal static string PinCollectionCancelled { + /// + /// Looks up a localized string similar to An unknown SCP03 error has occurred.. + /// + internal static string UnknownScp03Error { get { - return ResourceManager.GetString("PinCollectionCancelled", resourceCulture); + return ResourceManager.GetString("UnknownScp03Error", resourceCulture); } } - internal static string FingerprintCollectionCancelled { + /// + /// Looks up a localized string similar to Unknown YubiKey feature.. + /// + internal static string UnknownYubiKeyFeature { get { - return ResourceManager.GetString("FingerprintCollectionCancelled", resourceCulture); + return ResourceManager.GetString("UnknownYubiKeyFeature", resourceCulture); } } - internal static string FingerprintDatabaseFull { + /// + /// Looks up a localized string similar to The requested algorithm is not supported.. + /// + internal static string UnsupportedAlgorithm { get { - return ResourceManager.GetString("FingerprintDatabaseFull", resourceCulture); + return ResourceManager.GetString("UnsupportedAlgorithm", resourceCulture); } } - internal static string PinAlreadySet { + /// + /// Looks up a localized string similar to The certificate provided is not supported as an Attestation Certificate.. + /// + internal static string UnsupportedAttestationCert { get { - return ResourceManager.GetString("PinAlreadySet", resourceCulture); + return ResourceManager.GetString("UnsupportedAttestationCert", resourceCulture); } } - internal static string PinTooShort { + /// + /// Looks up a localized string similar to Timed out waiting for user interaction.. + /// + internal static string UserInteractionTimeout { get { - return ResourceManager.GetString("PinTooShort", resourceCulture); + return ResourceManager.GetString("UserInteractionTimeout", resourceCulture); } } - internal static string PinTooLong { + /// + /// Looks up a localized string similar to Cannot convert the data to the requested type. Expected only {0} byte(s) of data, but {1} byte(s) were present.. + /// + internal static string ValueConversionFailed { get { - return ResourceManager.GetString("PinTooLong", resourceCulture); + return ResourceManager.GetString("ValueConversionFailed", resourceCulture); } } - internal static string PinProtocolNotSupported { + /// + /// Looks up a localized string similar to The value {0} is not valid for the enum type {1}.. + /// + internal static string ValueIsNotEnum { get { - return ResourceManager.GetString("PinProtocolNotSupported", resourceCulture); + return ResourceManager.GetString("ValueIsNotEnum", resourceCulture); } } - internal static string NoActivePinProtocol { + /// + /// Looks up a localized string similar to The value must be between {0} and {1}, and the first value must be less than the second.. + /// + internal static string ValueMustBeBetweenXandY { get { - return ResourceManager.GetString("NoActivePinProtocol", resourceCulture); + return ResourceManager.GetString("ValueMustBeBetweenXandY", resourceCulture); } } - internal static string TypeNotSupported { + /// + /// Looks up a localized string similar to The HID code map must contain {0} HID codes. The supplied map contains {1}.. + /// + internal static string WrongHidCodeMapLength { get { - return ResourceManager.GetString("TypeNotSupported", resourceCulture); + return ResourceManager.GetString("WrongHidCodeMapLength", resourceCulture); } } - internal static string TypeMismatch { + /// + /// Looks up a localized string similar to The NDEF record has a type of {0}. Unable to translate it to {1} as requested.. + /// + internal static string WrongNdefType { get { - return ResourceManager.GetString("TypeMismatch", resourceCulture); + return ResourceManager.GetString("WrongNdefType", resourceCulture); } } - internal static string YubiHsmAuthInvalidHostChallengeLength { + /// + /// Looks up a localized string similar to The AES key must be exactly 16 bytes.. + /// + internal static string YubicoKeyWrongSize { get { - return ResourceManager.GetString("YubiHsmAuthInvalidHostChallengeLength", resourceCulture); + return ResourceManager.GetString("YubicoKeyWrongSize", resourceCulture); } } - internal static string YubiHsmAuthInvalidHsmDeviceChallengeLength { + /// + /// Looks up a localized string similar to The Yubico OTP algorithm requires a 6-byte challenge.. + /// + internal static string YubicoOtpChallengeLengthInvalid { get { - return ResourceManager.GetString("YubiHsmAuthInvalidHsmDeviceChallengeLength", resourceCulture); + return ResourceManager.GetString("YubicoOtpChallengeLengthInvalid", resourceCulture); } } - internal static string YubiHsmAuthMgmtKeyAuthFailed { + /// + /// Looks up a localized string similar to Yubico OTP is not compatible with TOTP.. + /// + internal static string YubicoOtpNotCompatible { get { - return ResourceManager.GetString("YubiHsmAuthMgmtKeyAuthFailed", resourceCulture); + return ResourceManager.GetString("YubicoOtpNotCompatible", resourceCulture); } } + /// + /// Looks up a localized string similar to Failed to authenticate the credential password. Retries remaining: {0}.. + /// internal static string YubiHsmAuthCredPasswordAuthFailed { get { return ResourceManager.GetString("YubiHsmAuthCredPasswordAuthFailed", resourceCulture); } } - internal static string Fido2NotEncapsulated { + /// + /// Looks up a localized string similar to The label must have a UTF-8 byte count between {0} and {1}, inclusive. The actual byte count was {2}.. + /// + internal static string YubiHsmAuthInvalidCredentialLabelLength { get { - return ResourceManager.GetString("Fido2NotEncapsulated", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidCredentialLabelLength", resourceCulture); } } - internal static string Fido2NoMoreRetries { + /// + /// Looks up a localized string similar to The encryption key must be exactly 16 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidEncSize { get { - return ResourceManager.GetString("Fido2NoMoreRetries", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidEncSize", resourceCulture); } } - internal static string Fido2NoPin { + /// + /// Looks up a localized string similar to The host challenge must be exactly 8 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidHostChallengeLength { get { - return ResourceManager.GetString("Fido2NoPin", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidHostChallengeLength", resourceCulture); } } - internal static string Fido2PermsNotSupported { + /// + /// Looks up a localized string similar to The HSM device challenge must be exactly 8 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidHsmDeviceChallengeLength { get { - return ResourceManager.GetString("Fido2PermsNotSupported", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidHsmDeviceChallengeLength", resourceCulture); } } - internal static string Fido2PermsMissing { + /// + /// Looks up a localized string similar to The MAC key must be exactly 16 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidMacSize { get { - return ResourceManager.GetString("Fido2PermsMissing", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidMacSize", resourceCulture); } } - internal static string Fido2RelyingPartyMissing { + /// + /// Looks up a localized string similar to The management key must be exactly 16 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidMgmtKeyLength { get { - return ResourceManager.GetString("Fido2RelyingPartyMissing", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidMgmtKeyLength", resourceCulture); } } - internal static string Fido2UvNotSupported { + /// + /// Looks up a localized string similar to The credential password must be exactly 16 bytes. The actual size was {0}.. + /// + internal static string YubiHsmAuthInvalidPasswordLength { get { - return ResourceManager.GetString("Fido2UvNotSupported", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthInvalidPasswordLength", resourceCulture); } } - internal static string Fido2NotAuthed { + /// + /// Looks up a localized string similar to The cryptographic key type is not supported.. + /// + internal static string YubiHsmAuthKeyTypeNotSupported { get { - return ResourceManager.GetString("Fido2NotAuthed", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthKeyTypeNotSupported", resourceCulture); } } - internal static string Fido2TouchTimeout { + /// + /// Looks up a localized string similar to Failed to authenticate the management key. Retries remaining: {0}.. + /// + internal static string YubiHsmAuthMgmtKeyAuthFailed { get { - return ResourceManager.GetString("Fido2TouchTimeout", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthMgmtKeyAuthFailed", resourceCulture); } } - internal static string Fido2FingerprintTimeout { + /// + /// Looks up a localized string similar to The operation timed out while waiting for touch.. + /// + internal static string YubiHsmAuthTouchTimeout { get { - return ResourceManager.GetString("Fido2FingerprintTimeout", resourceCulture); + return ResourceManager.GetString("YubiHsmAuthTouchTimeout", resourceCulture); } } - internal static string YubiHsmAuthTouchTimeout { + /// + /// Looks up a localized string similar to PIV management key mutual authentication failed because the YubiKey did not authenticate.. + /// + internal static string YubiKeyNotAuthenticatedInPiv { get { - return ResourceManager.GetString("YubiHsmAuthTouchTimeout", resourceCulture); + return ResourceManager.GetString("YubiKeyNotAuthenticatedInPiv", resourceCulture); } } - internal static string InvalidUriQuery { + /// + /// Looks up a localized string similar to The requested operation is not available on non-FIPS YubiKeys.. + /// + internal static string YubiKeyNotFips { get { - return ResourceManager.GetString("InvalidUriQuery", resourceCulture); + return ResourceManager.GetString("YubiKeyNotFips", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to YubiKey Operation Failed [{0}]. + /// + internal static string YubiKeyOperationFailed { + get { + return ResourceManager.GetString("YubiKeyOperationFailed", resourceCulture); } } } -} \ No newline at end of file +} diff --git a/Yubico.YubiKey/src/Resources/ExceptionMessages.resx b/Yubico.YubiKey/src/Resources/ExceptionMessages.resx index 81348e91..a2c9febd 100644 --- a/Yubico.YubiKey/src/Resources/ExceptionMessages.resx +++ b/Yubico.YubiKey/src/Resources/ExceptionMessages.resx @@ -904,4 +904,7 @@ The URI query cannot be null or empty. + + Unknown error when disposing PivSession + \ No newline at end of file diff --git a/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs b/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs index cad5eddc..e0e23d22 100644 --- a/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs +++ b/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs @@ -308,10 +308,20 @@ public void Dispose() // At the moment, there is no "close session" method. So for now, // just connect to the management application. - _ = Connection.SendCommand(new SelectApplicationCommand(YubiKeyApplication.Management)); + // This can fail, so we wrap it in a try catch-block to complete the disposal of the PivSession + try + { + _ = Connection.SendCommand(new SelectApplicationCommand(YubiKeyApplication.Management)); + } +#pragma warning disable CA1031 + catch (Exception e) +#pragma warning restore CA1031 + { + _log.LogWarning(e, ExceptionMessages.PivSessionDisposeUnknownError); + } + KeyCollector = null; ResetAuthenticationStatus(); - Connection.Dispose(); _disposed = true; @@ -531,7 +541,7 @@ public void MoveKey(byte sourceSlot, byte destinationSlot) } _log.LogDebug("Moving key from {SourceSlot} to {DestinationSlot}", sourceSlot, destinationSlot); - + var command = new MoveKeyCommand(sourceSlot, destinationSlot); var response = Connection.SendCommand(command); if (response.Status != ResponseStatus.Success) @@ -579,7 +589,7 @@ public void DeleteKey(byte slotToClear) } _log.LogDebug("Deleting key at slot {TargetSlot}", slotToClear); - + var command = new DeleteKeyCommand(slotToClear); var response = Connection.SendCommand(command); From e1794654e95826710f03fa0035373ad9017b37a6 Mon Sep 17 00:00:00 2001 From: Dennis Dyall Date: Wed, 28 Aug 2024 10:27:14 +0200 Subject: [PATCH 2/2] Adjusting log message and add example --- .../src/Resources/ExceptionMessages.Designer.cs | 2 +- Yubico.YubiKey/src/Resources/ExceptionMessages.resx | 2 +- Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs b/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs index 86a5a799..cdc9dd48 100644 --- a/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs +++ b/Yubico.YubiKey/src/Resources/ExceptionMessages.Designer.cs @@ -1914,7 +1914,7 @@ internal static string PinTooShort { } /// - /// Looks up a localized string similar to Unknown error when disposing PivSession. + /// Looks up a localized string similar to Exception caught when disposing PivSession: {0}, {1}. /// internal static string PivSessionDisposeUnknownError { get { diff --git a/Yubico.YubiKey/src/Resources/ExceptionMessages.resx b/Yubico.YubiKey/src/Resources/ExceptionMessages.resx index a2c9febd..479c635b 100644 --- a/Yubico.YubiKey/src/Resources/ExceptionMessages.resx +++ b/Yubico.YubiKey/src/Resources/ExceptionMessages.resx @@ -905,6 +905,6 @@ The URI query cannot be null or empty. - Unknown error when disposing PivSession + Exception caught when disposing PivSession: {0}, {1} \ No newline at end of file diff --git a/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs b/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs index e0e23d22..43c664c2 100644 --- a/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs +++ b/Yubico.YubiKey/src/Yubico/YubiKey/Piv/PivSession.cs @@ -308,7 +308,7 @@ public void Dispose() // At the moment, there is no "close session" method. So for now, // just connect to the management application. - // This can fail, so we wrap it in a try catch-block to complete the disposal of the PivSession + // This can fail, possibly resulting in a SCardException (or other), so we wrap it in a try catch-block to complete the disposal of the PivSession try { _ = Connection.SendCommand(new SelectApplicationCommand(YubiKeyApplication.Management)); @@ -317,7 +317,15 @@ public void Dispose() catch (Exception e) #pragma warning restore CA1031 { - _log.LogWarning(e, ExceptionMessages.PivSessionDisposeUnknownError); + string message = string.Format( + CultureInfo.CurrentCulture, + ExceptionMessages.PivSessionDisposeUnknownError, e.GetType(), e.Message); + + // Example: + // Exception caught when disposing PivSession: Yubico.PlatformInterop.SCardException, + // Unable to begin a transaction with the given smart card. SCARD_E_SERVICE_STOPPED: The smart card resource manager has shut down. + + _log.LogWarning(message); } KeyCollector = null;