Skip to content

Commit

Permalink
Negative list for set and sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
olibu committed Jan 29, 2024
1 parent 4978b90 commit c7cc3ba
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,12 @@ document.getElementById('btnCopyString').onclick = function (event) {
let result = ASN1.decode(window.derBuffer.subarray(pos, end));
let type = result.typeName();
switch (type) {
case 'UTF8String':
case 'PrintableString':
case 'TeletexString':
case 'VideotexString':
case 'IA5String':
case 'UniversalString':
navigator.clipboard.writeText(result.content());
case 'SET':
case 'SEQUENCE':
alert('Selected value is not a String!');
break;
default: alert('Selected value is not a String!');
default:
navigator.clipboard.writeText(result.content());
}
contextMenu.style.visibility = 'hidden';
event.stopPropagation();
Expand Down

0 comments on commit c7cc3ba

Please sign in to comment.