fix sign with path

This commit is contained in:
Michele Balistreri 2020-12-11 14:40:29 +03:00
parent d5b89f7e51
commit b06ae123c9
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ public class KeycardCommandSet {
public func sign(hash: [UInt8], path: String, makeCurrent: Bool) throws -> APDUResponse { public func sign(hash: [UInt8], path: String, makeCurrent: Bool) throws -> APDUResponse {
let path = try KeyPath(path) let path = try KeyPath(path)
let p1 = (makeCurrent ? SignP1.deriveAndMakeCurrent.rawValue : SignP1.currentKey.rawValue) | path.source.rawValue let p1 = (makeCurrent ? SignP1.deriveAndMakeCurrent.rawValue : SignP1.deriveKey.rawValue) | path.source.rawValue
return try sign(p1: p1, data: (hash + path.data)) return try sign(p1: p1, data: (hash + path.data))
} }