Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
popeeyy committed Dec 21, 2023
1 parent e66a5d9 commit 193edd0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/certUtils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ describe("cert utils", function() {
assert.isObject(cert._cert);
});

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() {
assert.throws(() => {
new Certificate();
Expand Down
3 changes: 3 additions & 0 deletions test/helpers/fido2-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3782,11 +3782,14 @@ const tpmAttestation = new Uint8Array([
0x3D,
]).buffer;

const truUCert = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNTekNDQWZLZ0F3SUJBZ0lVVzNYSzh5eXdiQVdsaWdsaXhJRjYzZHZxWXk4d0NnWUlLb1pJemowRUF3SXcKZkRFTE1Ba0dBMVVFQmhNQ1ZWTXhFVEFQQmdOVkJBZ01DRU52Ykc5eVlXUnZNUTh3RFFZRFZRUUhEQVpFWlc1MgpaWEl4RXpBUkJnTlZCQW9NQ2xSeWRWVXNJRWx1WXk0eElqQWdCZ05WQkFzTUdVRjFkR2hsYm5ScFkyRjBiM0lnClFYUjBaWE4wWVhScGIyNHhFREFPQmdOVkJBTU1CM1J5ZFhVdVlXa3dJQmNOTWpNeE1UQXpNakF6TmpVeFdoZ1AKTWpBMU16RXdNall5TURNMk5URmFNSHd4Q3pBSkJnTlZCQVlUQWxWVE1SRXdEd1lEVlFRSURBaERiMnh2Y21GawpiekVQTUEwR0ExVUVCd3dHUkdWdWRtVnlNUk13RVFZRFZRUUtEQXBVY25WVkxDQkpibU11TVNJd0lBWURWUVFMCkRCbEJkWFJvWlc1MGFXTmhkRzl5SUVGMGRHVnpkR0YwYVc5dU1SQXdEZ1lEVlFRRERBZDBjblYxTG1GcE1Ga3cKRXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVOQXZidGNjTXI3ai9TUldtcUlFWlRSV05KeWo2bXNZcgo1bEdlQWdkU0d5QzlPMDM1NlJJZWN1YVZpT3F6MER4Z1MxZi81S1BiWnAxdDB5RDJmVlJYOTZOUU1FNHdIUVlEClZSME9CQllFRkE1dEwxMGc4OHQycVhsUGxoSVNJMmRJemxhVk1COEdBMVVkSXdRWU1CYUFGQTV0TDEwZzg4dDIKcVhsUGxoSVNJMmRJemxhVk1Bd0dBMVVkRXdFQi93UUNNQUF3Q2dZSUtvWkl6ajBFQXdJRFJ3QXdSQUlnWGZ1dgpqc3ArNHY1aUdPcW5nVWdPZzFobWJnRlBGTWdJanlXeENLcXcvZDhDSUZpbUxOWExESXdBK29JYlAxeU9mcUU4CnhrNnE3LzRMV09WWWtSQUxvQkMyCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=";

const certs = {
yubiKeyAttestation,
yubicoRoot,
feitianFido2,
tpmAttestation,
truUCert,
};

/** ******************************************************************************
Expand Down

0 comments on commit 193edd0

Please sign in to comment.