diff --git a/Gemfile.lock b/Gemfile.lock index 214cdbc..22d0b8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,16 +5,17 @@ GEM base64 nkf rexml - activesupport (7.1.3.4) + activesupport (7.2.0) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) algoliasearch (1.27.5) @@ -26,7 +27,7 @@ GEM asciidoctor (~> 2.0) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.962.0) + aws-partitions (1.963.0) aws-sdk-core (3.201.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) @@ -86,7 +87,7 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) declarative (0.0.20) digest-crc (0.6.5) @@ -230,15 +231,15 @@ GEM jwt (2.8.2) base64 liferaft (0.0.6) + logger (1.6.0) mini_magick (4.13.2) mini_mime (1.1.5) mini_portile2 (2.8.7) - minitest (5.24.1) + minitest (5.25.0) molinillo (0.8.0) multi_json (1.15.0) multipart-post (2.4.1) mustache (1.1.1) - mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) naturally (2.2.1) @@ -256,7 +257,7 @@ GEM trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.3.4) + rexml (3.3.5) strscan rouge (2.0.7) ruby-macho (2.5.1) @@ -264,6 +265,7 @@ GEM rubyzip (2.3.2) sassc (2.4.0) ffi (~> 1.9) + securerandom (0.3.1) security (0.1.5) signet (0.19.0) addressable (~> 2.8) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f3d6201..cde7c5a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,12 @@ # 5.10.0 +## Added + +- Add public initializer for HealthCardResponse +- Add public initializer for AutCertificateResponse + +## Removed + - Remove dependency on GemCommonsKit - Remove dependency on DataKit diff --git a/Sources/HealthCardAccess/Responses/HealthCardResponse.swift b/Sources/HealthCardAccess/Responses/HealthCardResponse.swift index 071ea3c..ad6aab2 100644 --- a/Sources/HealthCardAccess/Responses/HealthCardResponse.swift +++ b/Sources/HealthCardAccess/Responses/HealthCardResponse.swift @@ -24,6 +24,16 @@ import Foundation /// - apduResponse /// - responseStatus public struct HealthCardResponse { + /// Default initializer for `HealthCardResponse` + /// + /// - Parameters: + /// - response: `ResponseType` holding the response data. + /// - responseStatus: `ResponseStatus` derived from the executed `HealthCardCommand` + public init(response: ResponseType, responseStatus: ResponseStatus) { + self.response = response + self.responseStatus = responseStatus + } + /// `ResponseType` holding the response data. public let response: ResponseType /// `ResponseStatus` derived from the executed `HealthCardCommand` and *sw* value of `ResponseType diff --git a/Sources/HealthCardControl/Authentication/HealthCardType+ESIGN.swift b/Sources/HealthCardControl/Authentication/HealthCardType+ESIGN.swift index dc0cf87..1936879 100644 --- a/Sources/HealthCardControl/Authentication/HealthCardType+ESIGN.swift +++ b/Sources/HealthCardControl/Authentication/HealthCardType+ESIGN.swift @@ -61,6 +61,16 @@ public enum AutCertInfo { /// Alias for the certificate response that holds the raw certificate + the AutCertInfo associated with it. public struct AutCertificateResponse { + /// Default initializer for AutCertificateResponse + /// + /// - Parameters: + /// - info: The AutCertInfo associated with the certificate + /// - certificate: Raw certificate data + public init(info: AutCertInfo, certificate: Data) { + self.info = info + self.certificate = certificate + } + /// The AutCertInfo associated with the certificate public let info: AutCertInfo /// Raw certificate data