Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fido2-lib

Package Overview
Dependencies
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fido2-lib - npm Package Compare versions

Comparing version 3.4.3 to 3.4.4

10

lib/certUtils.js

@@ -5,6 +5,8 @@ import { ab2str, coerceToArrayBuffer, isPem, pemToBase64, tools } from "./utils.js";

constructor(cert) {
let decoded;
// Clean up base64 string
if (typeof cert === "string" || cert instanceof String) {
cert = cert.replace(/\r/g, "");
cert = cert.replace(/\r/g, "").trim();
decoded = ab2str(coerceToArrayBuffer(cert, "certificate"));
}

@@ -14,4 +16,6 @@

cert = pemToBase64(cert);
} else if (decoded && isPem(decoded)) {
cert = pemToBase64(decoded);
}
// Clean up certificate

@@ -18,0 +22,0 @@ if (typeof cert === "string" || cert instanceof String) {

{
"name": "fido2-lib",
"version": "3.4.3",
"version": "3.4.4",
"description": "A library for performing FIDO 2.0 / WebAuthn functionality",

@@ -5,0 +5,0 @@ "type": "module",

@@ -32,2 +32,8 @@ // Testing lib

it("can decode base64 encoded cert", function() {
const cert = new Certificate(h.certs.truUCert);
assert.instanceOf(cert, Certificate);
assert.isObject(cert._cert);
});
it("throws if no arg to constructor", function() {

@@ -34,0 +40,0 @@ assert.throws(() => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc