From 36e260cfafc2755a47f1e5f542858ceb0c6c37df Mon Sep 17 00:00:00 2001 From: Bitgamma Date: Tue, 2 Feb 2021 14:29:11 +0300 Subject: [PATCH] Update KeycardCommandSet.swift fix export key --- Sources/Keycard/KeycardCommandSet.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Keycard/KeycardCommandSet.swift b/Sources/Keycard/KeycardCommandSet.swift index 68a5949..a484d85 100644 --- a/Sources/Keycard/KeycardCommandSet.swift +++ b/Sources/Keycard/KeycardCommandSet.swift @@ -230,7 +230,7 @@ public class KeycardCommandSet { public func exportKey(path: String, makeCurrent: Bool, publicOnly: Bool) throws -> APDUResponse { let path = try KeyPath(path) - let p1 = (makeCurrent ? ExportKeyP1.deriveAndMakeCurrent.rawValue : ExportKeyP1.deriveAndMakeCurrent.rawValue) | path.source.rawValue + let p1 = (makeCurrent ? ExportKeyP1.deriveAndMakeCurrent.rawValue : ExportKeyP1.deriveKey.rawValue) | path.source.rawValue let p2 = publicOnly ? ExportKeyP2.publicOnly.rawValue : ExportKeyP2.privateAndPublic.rawValue return try exportKey(p1: p1, p2: p2, data: path.data) }