Skip to content

Commit

Permalink
Merge pull request #62 from MasterKale/feature/upgrade-asn1-libs
Browse files Browse the repository at this point in the history
feature/upgrade-asn1-libs
  • Loading branch information
MasterKale authored Oct 12, 2020
2 parents c778c43 + 7439aef commit 3738f52
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 44 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.10.1",
"version": "0.10.2-alpha.0",
"npmClient": "npm",
"command": {
"publish": {
Expand Down
69 changes: 32 additions & 37 deletions packages/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@simplewebauthn/server",
"version": "0.10.1",
"version": "0.10.2-alpha.0",
"description": "SimpleWebAuthn for Servers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -32,9 +32,9 @@
"node"
],
"dependencies": {
"@peculiar/asn1-android": "2.0.8",
"@peculiar/asn1-schema": "2.0.8",
"@peculiar/asn1-x509": "2.0.10",
"@peculiar/asn1-android": "2.0.23",
"@peculiar/asn1-schema": "2.0.23",
"@peculiar/asn1-x509": "2.0.23",
"@simplewebauthn/typescript-types": "file:../typescript-types",
"base64url": "3.0.1",
"cbor": "5.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default async function verifyAttestationAndroidKey(options: Options): Pro
// Verify extKeyStore values
const { attestationChallenge, teeEnforced, softwareEnforced } = parsedExtKeyStore;

if (!Buffer.from(attestationChallenge).equals(clientDataHash)) {
if (!Buffer.from(attestationChallenge.buffer).equals(clientDataHash)) {
throw new Error('Attestation challenge was not equal to client data hash (AndroidKey)');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default async function verifyApple(options: Options): Promise<boolean> {
* TODO: Try and get @peculiar (GitHub) to add a schema for "1.2.840.113635.100.8.2" when we
* find out where it's defined (doesn't seem to be publicly documented at the moment...)
*/
const extNonce = Buffer.from(extCertNonce.extnValue).slice(6);
const extNonce = Buffer.from(extCertNonce.extnValue.buffer).slice(6);

if (!nonce.equals(extNonce)) {
throw new Error(`credCert nonce was not expected value (Apple)`);
Expand Down

0 comments on commit 3738f52

Please sign in to comment.