16 Commits

Author SHA1 Message Date
Jens Utbult a5a535ada6 Version 4.6 2025-03-21 15:23:06 +01:00
Jens Utbult 800617e5cb Prepare for 4.6 release. 2024-06-25 14:44:39 +02:00
Jens Utbult 888e225671 Bumped version to 4.5.0. 2024-03-27 10:43:31 +01:00
Jens Utbult 4048d6eecc Changed version to 4.4.1. 2024-03-25 10:04:43 +01:00
Jens Utbult 0833661b2d Changelog and updates for 4.5. 2024-03-25 09:54:47 +01:00
Jens Utbult 02403a2384 Updated changelog and prepare for 4.4.0. (#132) 2023-05-25 15:40:34 +02:00
Jens Utbult 1683baec50 Support for TKSmartCard (#107)
* First draft at implementing support for TKSmartCard.

* Add SPM header file.

* Add SPM header file.

* Fixed memory issue and added delay as a work around from makeSmartCard failing if being called to early after a new slot has been discovered.

* Fixed bug where we failed to clear old session state when creating a new session.

* Added missing devices and test for SmartCard over USB-C.

* Added missing devices in YubiKitDeviceCapabilities.

* Added documenation for the TKSmartCard based connection.

* Fixes some assertions that for some reason are being hit while running tests in latest Xcode.

* Fixed connection memory leak in tests.

* Make sure delegate responds to didConnectSmartCard: selector before calling it.

* Bumped some missed version numbers.

* Removed usb-c smart card tests that fails since we can not fake the version number of the os when running the tests on github.

* Handle TKSmartCard connection errors. Removed debug print.

* Minor spelling fixes.

* Return an error for non-supported sessions over a YKFSmartCardConnection.
2022-09-23 09:35:05 +02:00
Jens Utbult 7b19be11a3 Release 4.2.0 (#91)
* Release 4.2.0
2022-03-14 08:17:27 +01:00
Zsolt Török 46af5b134a Specify CoreNFC as a weak framework (#80)
In order to prevent older devices (like iPods) from crashing, we need to specify CoreNFC as a weak framework.
2022-02-22 09:20:56 +01:00
Jens Utbult 7e75fe8f05 YubiKit 4.1 (#71)
* Add timestamp to calculate OATH OTP.

* Add timestamp to calculate-all OATH OTP.

* Make version public in YKFManagementSession.

* If a connection is present when the delegate is set on the YubiKitManager it will immediately call the didConnect delegate methods.

* Refactored Management session to use TKTLVRecord instead of our own tlv-parsing.

* Removed extra dot at end of version string.

* Forgot to make delegate weak when moving it to a class variable.

* Fixed bug that made it impossible to unlock with password if a command had failed with not authenticated.

* Added stopWithErrorMessage: to nfc connection.

* Added stopNFCConnectionWithErrorMessage: to YubiKitManager.

* Improved Swift method translation.

* Added stopNFCConnectionWithMessage: to YubiKitManager.

* Forgot implementation of stopWithMessage:.

* Added dispatchAfterCurrentCommands to sessions to enable running a code block after all enqueued commands have completed.

* Only signal NFC disconnect if previous state was YKFNFCConnectionStateOpen.

* Send proper error codes when unlocking the OATH application

* Remove unused error definition.

* Remove unused files from project file as well.

* Return defined errors for wrong pin and pin entry locked.

* Less fragile comparision of algorithm type.

* Fixed bug when we tried to calculate more than 8 OATH credentials.

* Accidentally sent a auth required error instead of touch timeout.

* Fixed bug in authentication/touch timeout error handling.

* Reverted to previous behaviour where we singaled an error for NFC modal timeout and user cancel.

* New delegate method to catch NFC timeout and user cancelling the NFC modal.

* Make the didFailConnectingNFC method optional in the connection protocol.

* Fix broken non-trunkated calculation of OATH code.

* Remove broken OATH tests.

* Improved error checks and fixes a bug where authenticateWithManagementKey would fail to call its completion handler upon failure.

* Improved array out of bounds checks and more cautious logging.

* Bumped version number to 4.1.0 and updated changes.
2021-10-26 17:38:33 +02:00
Zsolt Török fcceff9beb Exclude Swift package manager header links from CocoaPods (#72)
Having a symlink for every header file causes CocoaPods to generate a project that has duplicated entry for each header file. Excluding the content of SPMHeaderLinks can solve this issue.
2021-10-20 18:22:09 +02:00
Jens Utbult c1fb112cd6 YubiKit 4.0 (#65)
* Use a block to retrieve the OATH session to the Yubikey. When the block returns the OATH application in the key is already selected.

* Renamed most of the AccessorySession to AccessoryConnection

* Renamed YKFNFCSession to YKFNFCConnection

* Renamed Session directories to Connection

* Fixed test that did not compile after name changes.

* Renamed OATHService to OATHSession

* Tests fixed after renaming OATHService to OATHSession

* Renamed FIDO2Service to FIDO2Session

* Renamed RawCommandService to RawCommandSession

* Renamed MGMTService to MGMTSession

* Renamed ChallengeResponseService to ChallengeResponseSession

* Renamed U2FService to U2FSession

* Renamed YKFKeyService to YKFKeySession

* Moved all Session implementations from Service to Session folder

* Renamed YKFNFCOTPService to YKFNFCOTPSession

* Fixed broken unit-test

* Renamed MGMT to Management.

* Removed the old oathService property and updated the tests to use the block based api.

* Removed the old oathService property from the NFCConnection.

* Replaced old u2fService with block based implementation.

* Replaced old fido2Service with block based implementation.

* Connections are now delivered via a delegate protocol. Demo application changed to reflect this and the FIDO2 demo has been rewritten.

* Add a shared YKFConnectionProtocol defining the methods used to retrieve the sessions. Removed YKFAccessoryConnectionProtocol and replace it with its concrete implementation.

* Removed YKFNFCConnectionProtocol and replace it with its concrete implementation.

* Support for NFC in FIDO2 demo.

* Fix bug in FIDO2 demo which only let you do one NFC call per app session.

* Replaced YKFKeySessionDelegate with a simpler YKFSessionProtocol that allows us to clear the current session in a much simpler way

* Make the ConnectionProtocol return concrete implementations instead of protocols

* New callback api for sessions in NFCconnection

* Moved last of the Session types to the callback based scheme. ChalRespSession and ManagementSession are now subclasses of RawCommandSession instead of using a concrete implementetion of RawCommandSession to do their bidding. PCSCLayer now makes async operations synchronous by it self instead of using the synchronous methods in RawCommandSession.

* Moved demos from UI to Demos folder.

* Removed OtherDemosTableViewController and implented the functionality straight in the storyboard instead.

* Refactored RawCommandServiceDemoViewController to use the new API.

* Fixed typo in OATHSendRemainingAPDU.

* Assign completion block as connection callback.

* RawCommandSession now reads more data if needed from the key before returning the result.

* Removed the PCSC demo since we want integrators to use the RawCommandSession instead.

* U2F demo fixed for the updated API.

* Fixed bug introduced when changing from if to guard statements and forgetting to negate the expressions.

* Removed shortStatusCodeFromStatusCode.

* RawCommandSession now returns the actual data of the response and in case of an error it creates an Error with the error code and returns only that.

* Implemented SmartCardInterface that will replace RawCommandSession in the future. This is used by ManagementSession to handle key communicationnow but will be used by all sessions.

* ChallengeResponseSession is now using the SmartCardInterface for communication with the yubikey.

* FIDO2Session is now using the SmartCardInterface for communication with the yubikey. Added support i SmartCardInterface for executing blocks when all current commands has finished.

* Simplified session creation for ManagementeSession and ChalRespSession.

* U2FSession is now using the SmartCardInterface for communication with the yubikey.

* OATHSession is now using the SmartCardInterface for communication with the yubikey.

* Remove executeAfterCurrentCommands in SmartCardInterface and implement delayed dispatch where it is needed instead.

* Replace RawCommandSession with SmartCardInterface and update tests and demo application.

* Use the selectApplication method instead of executeCommand when selecting the PIV application in the raw command demo

* Some cleanup and removal of unnecessary classes in the ManagementSession.

* Removed the request layer and most of the responses from the OATHSession.

* Cleaned up the return types of OATH Session to be more in line with the android SDK. Improved test coverage in the manual test app for OATH.

* Removed the request layer from the U2FSession.

* Updated SPM header links.

* Fixed broken header file.

* Fixed broken header file.

* Removed accidentaly left file.

* Removed accidentaly left file.

* Removed accidentaly left file.

* More initialisers for CredentialTemplate.

* Added OATHCredentialTypes to Yubikit header file.

* Proper nullable hints on OATHCredentialTemplate.

* More convenience initialisers for CredentialTemplate.

* Renamed account to accountName for OATHCredentials to better align with the specification. Changed method name for putCredential to putCredentialTemplate for improved Swift interoperability.

* Removed all requests from FIDO2 session. Slightly improved FIDO2 Demo.

* Updated project settings and fixed a few warnings.

* Replaced YubiKitManagerProtocol with its concrete implementation. Added otpService to YubiKitManager.

* Rudimentary documentation of YubiKitManager.

* Simple OATH demo added to demo app.

* Added improved full stack and public API testing app/XCTestCase framework.

* OATH tests added to new test suite.

* Management tests added to new test suite.

* Basic FIDO2 tests added to new test suite.

* Assertion tests and handling of touch key events added to FIDO2 tests.

* ChallengeResponse test added to new test suite.

* U2F test added to new test suite.

* Removed old FullStackTests

* Fixed broken UnitTests.

* Fixed broken UnitTests.

* Renamed old RawCommandService Demo to SmartCardInterface.

* Removed all references to Key in files, classes and structs.

* Fixed broken UNIT tests.

* Added transitioning guide to SDK

* Fixed broken link to transitioning document.

* Improved connection documentation.

* Improved sample wrapper documentation.

* Documentation for SmartCardInterface.

* Fixed link text to SmartCardInterface docs.

* Make sure to reset password when done testing OATH.

* ChallengeResponse documentation.

* Minor error fixed in ChallengeResponse documentation.

* OATH documentation.

* Fixed comparision mistake in documentation

* ManagementSession documentation.

* U2F documentation.

* Delete RawCommand and PC/SC documentation.

* Yubico OTP documentation.

* FIDO2 documentation.

* Renamed responses to the type actually being returned.

* Fixed missing SPM symbolic links.

* Updated the README.md to match the changes in our APIs.

* Removed all references to Key in files, classes and structs.

* Improved connection documentation.

* Fixed link text to SmartCardInterface docs.

* Added basic PIVSession.

* Implemented verifyPIN for PIV

* Added version and serial number to PIV.

* Allow version 5.4.x as well in PIV tests.

* More lenient testing of version number in ManagementTests.

* Prettier printing of test results.

* Added printing of OATH test results.

* Implemented system for verifing if a feature is supported by a specific version of the YubiKey.

* Return number of retries in PIV verifyPin.

* Reset PIV session and improved retry count handling.

* PIV pin and puk metadata.

* PIV set pin, puk and unblock pin.

* PIV use consts for ins and p2 when blocking puk. Removed debug printing.

* PIV authenticate.

* PIV authenticate.

* Project file broken during rebase

* Minor refactor of the blockPin method in PIVTests.

* PIV set management key.

* Refactored PIV authenticate method signature.

* PIV get pin attempts.

* PIV set Pin and Puk attempts.

* PIV get management key metadata.

* PIV skip tests not supported buy the YubiKey.

* PIV generate key.

* PIV put and read certificate.

* PIV delete certificate.

* Move certificate creation out of tests.

* PIV decrypt.

* Replaced YKFCommandConfiguration with a single NSTimeInterval for the timeout.

* Changed chipher paramter name to encrypted.

* PIV attestation.

* PIV shared EC secret.

* PIV pad RSA data.

* PIV pad EC data.

* PIV sign.

* PIV more complete shared secret test.

* PIV remove unused parameter from shared secret test.

* PIV more enryption attributes cleanup.

* Add missing SPM header files.

* Add import for TKTLVRecord.h.

* PIV import RSA key to YubiKey.

* PIV import EC key to YubiKey.

* PIV add pin and touch policy arguments to putKey.

* PIV add pin and touch policy arguments to generateKey.

* PIV improved error handling in full stack tests.

* Removed more unnecessary protocols.

* PIV inline documentation

* Added PIV documentation and added YKF-prefix to the session callbacks.

* Deployment version set to iOS 11 and fixed bug in demo app.

* PIV improved swift names for put key and put certificate methods.

* Fixed full stack test deployment target.

* Removed 32 bits builds.

* Updated changelog for 4.0.

* Updated podspec for 4.0.

* Added link to tests from PIV documentation.

* Update piv.md (#66)

Corrected typos.

* Added missing documentation and renamed some callback blocks to align with the rest of the APIs.

* Deprecated YKFPCSC.

* Quotes around class names in changelog.

* Suppress deprecation warnings in our tests.

* Bumped cocoapod SDK version in docs.

* Recreated SPM header symlinks.

* Fixed imports cocoapod complained about.

* Cocoapod fix.

Co-authored-by: Fiona Fincannon <fiona.fincannon@yubico.com>
2021-04-01 10:18:07 +02:00
Jens Utbult 7a0521f7da Preparing version 3.2.0 (#57) 2020-09-23 14:43:22 +02:00
imakhalova 2806a3ba07 Update documentation and version for release (#38)
* update documentation for release

* update podspec

* fix typos in documentation
2020-03-17 10:22:35 -07:00
imakhalova 86e341a2b7 Update versioning for release (#22)
Using 3.0.0 for release version
Populated release notes,
Updates in readme for cocoapods integration
2019-12-13 14:33:04 -08:00
Irina Makhalova 9f5986ee4e add NFC support for exisiting services to support YubiKey NFC 2019-11-04 13:49:20 -08:00