Skip to content

Commit e7b1733

Browse files
Merge pull request #199 from hakusai22/main
fix typos
2 parents 1e530fe + bead1cf commit e7b1733

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

jws_verification.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class SignedDataVerifier {
6363
* @param enableOnlineChecks Whether to enable revocation checking and check expiration using the current date
6464
* @param environment The App Store environment to target for checks
6565
* @param bundleId The app's bundle identifier
66-
* @param appAppleId The app's identifier, ommitted in the sandbox environment
66+
* @param appAppleId The app's identifier, omitted in the sandbox environment
6767
*/
6868
constructor(appleRootCertificates: Buffer[], enableOnlineChecks: boolean, environment: Environment, bundleId: string, appAppleId?: number) {
6969
this.rootCertificates = appleRootCertificates.map(cert => new X509Certificate(cert))
@@ -328,9 +328,9 @@ export class SignedDataVerifier {
328328
// This is directly signed by the issuer
329329
} else if (signingCert.verify(issuer.publicKey)) {
330330
// This is issued by the issuer, let's check the dates and purpose
331-
const signingCertAsign = new X509()
332-
signingCertAsign.readCertPEM(signingCert.toString())
333-
if (!signingCertAsign.getExtExtKeyUsage().array.includes("ocspSigning")) {
331+
const signingCertAssign = new X509()
332+
signingCertAssign.readCertPEM(signingCert.toString())
333+
if (!signingCertAssign.getExtExtKeyUsage().array.includes("ocspSigning")) {
334334
throw new VerificationException(VerificationStatus.INVALID_CERTIFICATE)
335335
}
336336
this.checkDates(signingCert, new Date())

tests/unit-tests/jws_verification.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ describe("Decoding checks", () => {
193193
it('should fail to verify with an invalid bundle id', async () => {
194194
const verifier = getSignedPayloadVerifierWithDefaultAppAppleId(Environment.SANDBOX, "com.example")
195195
try {
196-
const wrongBundelId = readFile('tests/resources/mock_signed_data/wrongBundleId')
197-
await verifier.verifyAndDecodeNotification(wrongBundelId)
196+
const wrongBundleId = readFile('tests/resources/mock_signed_data/wrongBundleId')
197+
await verifier.verifyAndDecodeNotification(wrongBundleId)
198198
assert(false)
199199
} catch (e) {
200200
expect(e).toBeInstanceOf(VerificationException)

0 commit comments

Comments
 (0)