From e6dbc080d8b0bd201ed615d6ce8a5636e8e4034d Mon Sep 17 00:00:00 2001 From: Oliver Burgmaier Date: Mon, 29 Jan 2024 17:48:31 +0000 Subject: [PATCH] Negative list for set and sequence --- index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index a7f528d..fc3d4a2 100644 --- a/index.js +++ b/index.js @@ -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(); -- 2.51.2