Skip to content

Commit

Permalink
Updated to latest version of OpenSSL - 1.1.1900
Browse files Browse the repository at this point in the history
Fixed warnings of publishing updates on background thread when scanning MRZ (example SPM)
DataGroup12 class is now public (PR152) - thanks @recp
Improved compatibility with some documents by omitting LE (PR153) - set LE to -1 for commands not expected to return data - thanks @TimoTegtmeier
  • Loading branch information
AndyQ committed Dec 18, 2022
1 parent e059cf0 commit 43892bb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v2.0.1
Updated to latest version of OpenSSL - 1.1.1900
Fixed warnings of publishing updates on background thread when scanning MRZ (example SPM)
DataGroup12 class is now public (PR152) - thanks @recp
Improved compatibility with some documents by omitting LE (PR153) - set LE to -1 for commands not expected to return data - thanks @TimoTegtmeier

v2.0.0
Switched app over to user async/await - makes the code paths much simpler
Added fix for DG11 names - thanks @TerjeLon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ public class VisionViewController: ViewController {
if let sureNumber = mrzTracker.getStableString() {
showString(string: sureNumber)
mrzTracker.reset(string: sureNumber)
completionHandler?(sureNumber)

DispatchQueue.main.async {
self.completionHandler?(sureNumber)
}

}
}

Expand Down
4 changes: 2 additions & 2 deletions NFCPassportReader.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "NFCPassportReader"
spec.version = "1.1.9"
spec.version = "2.0.1"
spec.summary = "This package handles reading an NFC Enabled passport using iOS 13 CoreNFC APIS"

spec.homepage = "https://github.com/AndyQ/NFCPassportReader"
Expand All @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|

spec.swift_version = "5.0"

spec.dependency "OpenSSL-Universal", '1.1.180'
spec.dependency "OpenSSL-Universal", '1.1.1900'
spec.xcconfig = { 'OTHER_LDFLAGS' => '-weak_framework CryptoKit -weak_framework CoreNFC -weak_framework CryptoTokenKit' }

spec.pod_target_xcconfig = {
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.180"))
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.1900"))

],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/NFCPassportReader/DataGroups/DataGroup12.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import Foundation

@available(iOS 13, macOS 10.15, *)
class DataGroup12 : DataGroup {
public class DataGroup12 : DataGroup {

public private(set) var issuingAuthority : String?
public private(set) var dateOfIssue : String?
Expand Down
4 changes: 2 additions & 2 deletions Sources/NFCPassportReader/TagReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class TagReader {

let data = oidBytes + keyTypeBytes

let cmd = NFCISO7816APDU(instructionClass: 00, instructionCode: 0x22, p1Parameter: 0xC1, p2Parameter: 0xA4, data: Data(data), expectedResponseLength: 256)
let cmd = NFCISO7816APDU(instructionClass: 00, instructionCode: 0x22, p1Parameter: 0xC1, p2Parameter: 0xA4, data: Data(data), expectedResponseLength: -1)

return try await send( cmd: cmd )
}
Expand Down Expand Up @@ -222,7 +222,7 @@ public class TagReader {
// By executing above SELECT command (with data=0x3F00) master file should be selected and you should be able to read EF.CardAccess from passport.

// First select master file
let cmd : NFCISO7816APDU = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xA4, p1Parameter: 0x00, p2Parameter: 0x0C, data: Data([0x3f,0x00]), expectedResponseLength: 256)
let cmd : NFCISO7816APDU = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xA4, p1Parameter: 0x00, p2Parameter: 0x0C, data: Data([0x3f,0x00]), expectedResponseLength: -1)

_ = try await send( cmd: cmd)

Expand Down

0 comments on commit 43892bb

Please sign in to comment.