DP-3T / dp3t-sdk-ios

The DP3T-SDK for iOS
Mozilla Public License 2.0
151 stars 61 forks source link

Specify PublicKey Format #237

Open ubamrein opened 4 years ago

ubamrein commented 4 years ago

According to the JWTVerifier source code, only a [...] UTF8 encoded PEM public key, with a "BEGIN PUBLIC KEY" header is supported. This has lead to confusion (https://github.com/DP-3T/dp3t-app-ios-ch/issues/352) since Android allows the use of a x509-Certificate directly.

Either iOS abstracts the public key in a type alias as well, and provides the corresponding constructors, or specifies the format needed here https://github.com/DP-3T/dp3t-sdk-ios/blob/f0f493971fe9d3df43fe897d7424aca35cfe21ca/Sources/DP3TSDK/utils/JWTVerification.swift#L41

Further, the documentation needs to be updated.