@peculiar/certificates-viewer 3.2.1 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{certification_request-cde57123.js → certification_request-50ce61b3.js} +643 -235
- package/dist/cjs/crl-0c15e04a.js +312 -0
- package/dist/cjs/{index-ff818d4d.js → download-a97f4cb2.js} +106 -2
- package/dist/cjs/index.cjs.js +1 -3
- package/dist/cjs/l10n-4eaa5263.js +167 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{peculiar-attribute-certificate-viewer_2.cjs.entry.js → peculiar-attribute-certificate-viewer_3.cjs.entry.js} +123 -21
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -15
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +2 -2
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +6 -25
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -8
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/{public_key-2f5bd471.js → public_key-2b73778a.js} +80 -40
- package/dist/cjs/{x509_certificate-51a97033.js → x509_certificate-c94ce29e.js} +13 -7
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +19 -6
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +2 -1
- package/dist/collection/components/certificate-viewer/basic_information.js +3 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/crl_number_extension.js +19 -0
- package/dist/collection/components/certificate-viewer/extensions/index.js +9 -1
- package/dist/collection/components/certificate-viewer/extensions/issuing_distribution_point_extension.js +27 -0
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/miscellaneous.js +2 -20
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +2 -3
- package/dist/collection/components/crl-viewer/crl-viewer.js +234 -0
- package/dist/collection/components/crl-viewer/revoked_certificates.js +27 -0
- package/dist/collection/crypto/crl.js +82 -0
- package/dist/collection/crypto/csr.js +7 -0
- package/dist/collection/crypto/extension.js +10 -1
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/utils.js +5 -4
- package/dist/collection/crypto/x509_attribute_certificate.js +7 -1
- package/dist/collection/crypto/x509_certificate.js +7 -1
- package/dist/collection/locales/en.json +12 -1
- package/dist/collection/utils/download.js +18 -2
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/validator.js +2 -0
- package/dist/esm/{certification_request-c0674647.js → certification_request-5b5c2fa2.js} +577 -172
- package/dist/esm/crl-10d4db54.js +308 -0
- package/dist/esm/{index-0ba131b0.js → download-67ac9120.js} +102 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/l10n-116c79fa.js +163 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{peculiar-attribute-certificate-viewer_2.entry.js → peculiar-attribute-certificate-viewer_3.entry.js} +113 -12
- package/dist/esm/peculiar-certificate-decoder.entry.js +21 -11
- package/dist/esm/peculiar-certificate-summary_3.entry.js +2 -2
- package/dist/esm/peculiar-certificate-viewer.entry.js +6 -25
- package/dist/esm/peculiar-certificates-viewer.entry.js +6 -8
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{public_key-38c9ddc8.js → public_key-c1e6801e.js} +67 -28
- package/dist/esm/{x509_certificate-12f6d344.js → x509_certificate-61126913.js} +9 -3
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/locales/en.json +12 -1
- package/dist/peculiar/p-10aa0b03.entry.js +11 -0
- package/dist/peculiar/{p-17c4da7b.js → p-309fdd02.js} +2 -2
- package/dist/peculiar/p-318a1e9f.entry.js +4 -0
- package/dist/peculiar/p-53aac672.js +63 -0
- package/dist/peculiar/p-5a898f51.js +32 -0
- package/dist/peculiar/{p-38635919.entry.js → p-652f77d0.entry.js} +1 -1
- package/dist/peculiar/p-7ef69178.entry.js +4 -0
- package/dist/peculiar/{p-464e0943.js → p-bbf0fd6c.js} +9 -9
- package/dist/peculiar/p-cff9655c.js +18 -0
- package/dist/peculiar/p-ed58acd0.js +12 -0
- package/dist/peculiar/p-ff867be1.entry.js +26 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
- package/dist/types/components/certificate-viewer/basic_information.d.ts +2 -0
- package/dist/types/components/certificate-viewer/extensions/crl_number_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/extensions/issuing_distribution_point_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +2 -2
- package/dist/types/components/certificate-viewer/row.d.ts +1 -1
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +59 -0
- package/dist/types/components/crl-viewer/revoked_certificates.d.ts +14 -0
- package/dist/types/components.d.ts +66 -0
- package/dist/types/crypto/crl.d.ts +28 -0
- package/dist/types/crypto/csr.d.ts +2 -0
- package/dist/types/crypto/extension.d.ts +2 -2
- package/dist/types/crypto/index.d.ts +1 -0
- package/dist/types/crypto/x509_attribute_certificate.d.ts +2 -0
- package/dist/types/crypto/x509_certificate.d.ts +2 -0
- package/dist/types/utils/download.d.ts +10 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/l10n.d.ts +11 -0
- package/dist/types/utils/validator.d.ts +1 -0
- package/package.json +19 -19
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +0 -23
- package/dist/cjs/csr-78378ed0.js +0 -150
- package/dist/cjs/download-6724f3a7.js +0 -79
- package/dist/cjs/l10n-a048a686.js +0 -145
- package/dist/cjs/x509_attribute_certificate-cc325b70.js +0 -87
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +0 -20
- package/dist/esm/csr-c1b6a176.js +0 -147
- package/dist/esm/download-735fb2eb.js +0 -76
- package/dist/esm/l10n-ac28fa92.js +0 -141
- package/dist/esm/x509_attribute_certificate-a6d4aa15.js +0 -85
- package/dist/peculiar/p-006865d7.js +0 -4
- package/dist/peculiar/p-3f8d1008.entry.js +0 -4
- package/dist/peculiar/p-42da7f97.js +0 -11
- package/dist/peculiar/p-4f4c1d30.js +0 -12
- package/dist/peculiar/p-6011646e.entry.js +0 -11
- package/dist/peculiar/p-6bfd077c.entry.js +0 -18
- package/dist/peculiar/p-6c510523.js +0 -18
- package/dist/peculiar/p-986cc770.entry.js +0 -11
- package/dist/peculiar/p-b765873e.js +0 -78
- package/dist/peculiar/p-d0b55fbb.js +0 -4
- package/dist/peculiar/p-d7a13cb4.js +0 -18
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
|
+
function t(t,r,e,n="application/octet-stream"){const i=new Blob([t],{type:n});if(navigator.msSaveBlob)return navigator.msSaveBlob(i,`${r}.${e}`),new Promise((t=>setTimeout(t,100)));const s=window.URL.createObjectURL(i),a=document.createElement("a"),o=document.createElement("iframe");return a.style.display="none",o.style.display="none",o.name=s,document.body.appendChild(o),a.href=s,a.target=s,a.download=`${r}.${e}`,document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),new Promise((t=>setTimeout((()=>{document.body.removeChild(o),t(void 0)}),100)))}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,r,e){return t(e={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var n=e((function(t,r){Object.defineProperty(r,"__esModule",{value:!0});class e{static isArrayBuffer(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t).slice().buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,r){if(t.constructor===r)return t;if(this.isArrayBuffer(t))return new r(t);if(this.isArrayBufferView(t))return new r(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,r){const n=e.toUint8Array(t),i=e.toUint8Array(r);if(n.length!==i.byteLength)return!1;for(let t=0;t<n.length;t++)if(n[t]!==i[t])return!1;return!0}static concat(...t){if(Array.isArray(t[0])){const r=t[0];let e=0;for(const t of r)e+=t.byteLength;const n=new Uint8Array(e);let i=0;for(const t of r){const r=this.toUint8Array(t);n.set(r,i),i+=r.length}return t[1]?this.toView(n,t[1]):n.buffer}return this.concat(t)}}class n{static fromString(t){const r=unescape(encodeURIComponent(t)),e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer}static toString(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return decodeURIComponent(escape(n))}}class i{static toString(t,r=!1){const n=e.toArrayBuffer(t),i=new DataView(n);let s="";for(let t=0;t<n.byteLength;t+=2){const e=i.getUint16(t,r);s+=String.fromCharCode(e)}return s}static fromString(t,r=!1){const e=new ArrayBuffer(2*t.length),n=new DataView(e);for(let e=0;e<t.length;e++)n.setUint16(2*e,t.charCodeAt(e),r);return e}}class s{static isHex(t){return"string"==typeof t&&/^[a-z0-9]+$/i.test(t)}static isBase64(t){return"string"==typeof t&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}static isBase64Url(t){return"string"==typeof t&&/^[a-zA-Z0-9-_]+$/i.test(t)}static ToString(t,r="utf8"){const n=e.toUint8Array(t);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return i.toString(n,!0);case"utf16":case"utf16be":return i.toString(n);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(t,r="utf8"){if(!t)return new ArrayBuffer(0);switch(r.toLowerCase()){case"utf8":return this.FromUtf8String(t);case"binary":return this.FromBinary(t);case"hex":return this.FromHex(t);case"base64":return this.FromBase64(t);case"base64url":return this.FromBase64Url(t);case"utf16le":return i.fromString(t,!0);case"utf16":case"utf16be":return i.fromString(t);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToBase64(t){const r=e.toUint8Array(t);if("undefined"!=typeof btoa){const t=this.ToString(r,"binary");return btoa(t)}return Buffer.from(r).toString("base64")}static FromBase64(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}static FromBase64Url(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(t){return this.ToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(t,r=s.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.FromBinary(t);case"utf8":return n.fromString(t);case"utf16":case"utf16be":return i.fromString(t);case"utf16le":case"usc2":return i.fromString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToUtf8String(t,r=s.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.ToBinary(t);case"utf8":return n.toString(t);case"utf16":case"utf16be":return i.toString(t);case"utf16le":case"usc2":return i.toString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromBinary(t){const r=t.length,e=new Uint8Array(r);for(let n=0;n<r;n++)e[n]=t.charCodeAt(n);return e.buffer}static ToBinary(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}static ToHex(t){const r=e.toUint8Array(t),n=[],i=r.length;for(let t=0;t<i;t++){const e=r[t].toString(16).padStart(2,"0");n.push(e)}return n.join("")}static FromHex(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isHex(r))throw new TypeError("Argument 'hexString' is not HEX encoded");r.length%2&&(r=`0${r}`);const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2);e[t/2]=parseInt(n,16)}return e.buffer}static ToUtf16String(t,r=!1){return i.toString(t,r)}static FromUtf16String(t,r=!1){return i.fromString(t,r)}static Base64Padding(t){const r=4-t.length%4;if(r<4)for(let e=0;e<r;e++)t+="=";return t}static formatString(t){return(null==t?void 0:t.replace(/[\n\r\t ]/g,""))||""}}s.DEFAULT_UTF8_ENCODING="utf8",r.BufferSourceConverter=e,r.Convert=s,r.assign=function(t){const r=arguments[0];for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)r[t]=e[t]}return r},r.combine=function(...t){const r=t.map((t=>t.byteLength)).reduce(((t,r)=>t+r)),e=new Uint8Array(r);let n=0;return t.map((t=>new Uint8Array(t))).forEach((t=>{for(const r of t)e[n++]=r})),e.buffer},r.isEqual=function(t,r){if(!t||!r)return!1;if(t.byteLength!==r.byteLength)return!1;const e=new Uint8Array(t),n=new Uint8Array(r);for(let r=0;r<t.byteLength;r++)if(e[r]!==n[r])return!1;return!0}}));
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/class i{}i.cert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")}},i.attrCert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")}},i.csr={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")}},i.crl={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")}};export{i as D,r as a,n as b,e as c,t as d}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{c as t,a as n}from"./p-cff9655c.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",e="second",i="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}},y=function(t,n,r){var e=String(t);return!e||e.length>=n?t:""+Array(n+1-e.length).join(r)+t},M={s:y,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),e=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+y(e,2,"0")+":"+y(i,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var e=12*(r.year()-n.year())+(r.month()-n.month()),i=n.clone().add(e,o),s=r-i<0,u=n.clone().add(e+(s?-1:1),o);return+(-(e+(r-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:i,s:e,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=m;var g=function(t){return t instanceof _},w=function t(n,r,e){var i;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();p[s]&&(i=s),r&&(p[s]=r,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;p[a]=n,i=a}return!e&&i&&(D=i),i||!e&&D},S=function(t,n){if(g(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=M;b.l=w,b.i=g,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function m(t){this.$L=w(t.locale,null,!0),this.parse(t)}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var e=n.match(l);if(e){var i=e[2]-1||0,s=(e[7]||"0").substring(0,3);return r?new Date(Date.UTC(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)):new Date(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return b},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},y.isAfter=function(t,n){return S(t)<this.startOf(n)},y.isBefore=function(t,n){return this.endOf(n)<S(t)},y.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var e=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?e:e.endOf(u)},v=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},m=this.$W,y=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,y):l(0,y+1);case a:var p=this.$locale().weekStart||0,g=(m<p?m+7:m)-p;return l(h?M-g:M+(6-g),y);case u:case f:return v(D+"Hours",0);case s:return v(D+"Minutes",1);case i:return v(D+"Seconds",2);case e:return v(D+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[i]=d+"Minutes",a[e]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],v=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var m=this.clone().set(f,1);m.$d[l](v),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},y.set=function(t,n){return this.clone().$set(t,n)},y.get=function(t){return this[b.p(t)]()},y.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),v=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return v(1);if(l===a)return v(7);var m=(f={},f[i]=t,f[s]=n,f[e]=1e3,f)[l]||1,y=this.$d.getTime()+r*m;return b.w(y,this)},y.subtract=function(t,n){return this.add(-1*t,n)},y.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var e=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var e=t<12?"AM":"PM";return r?e.toLowerCase():e},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:i};return e.replace(v,(function(t,n){return n||m[t]||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,d){var l,v=b.p(f),m=S(r),y=(m.utcOffset()-this.utcOffset())*t,M=this-m,D=b.m(this,m);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(M-y)/6048e5,l[u]=(M-y)/864e5,l[s]=M/n,l[i]=M/t,l[e]=M/1e3,l)[v]||M,d?D:b.a(D)},y.daysInMonth=function(){return this.endOf(o).$D},y.$locale=function(){return p[this.$L]},y.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),e=w(t,n,!0);return e&&(r.$L=e),r},y.clone=function(){return b.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),C=_.prototype;return S.prototype=C,[["$ms",r],["$s",e],["$m",i],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){C[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=g,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()})),e=t((function(t){t.exports=function(t,n,r){t=t||{};var e=n.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,n,r,i){return e.fromToBase(t,n,r,i)}r.en.relativeTime=i,e.fromToBase=function(n,e,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||i,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,v=0;v<l;v+=1){var m=d[v];m.d&&(o=u?r(n).diff(s,m.d,!0):s.diff(n,m.d,!0));var y=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,y<=m.r||!m.r){y<=1&&v>0&&(m=d[v-1]);var M=f[m.l];a&&(y=a(""+y)),h="string"==typeof M?M.replace("%d",y):M(y,e,m.l,c);break}}if(e)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},e.to=function(t,n){return s(t,n,this,!0)},e.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};e.toNow=function(t){return this.to(u(this),t)},e.fromNow=function(t){return this.from(u(this),t)}}}));
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
r.extend(e);const i=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const e=r(t),i=r(n);return e.to(i,!0)},u={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",lastUpdate:"Last Update",nextUpdate:"Next Update",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type",revokedCertificates:"Revoked Certificates",revocation:"Revocation",yes:"Yes",no:"No",onlyUserCertificates:"Only User Certificates",onlyAttributeCertificates:"Only Attribute Certificates",onlyCACertificates:"Only CA Certificates",indirectCRL:"Indirect CRL",onlyReasons:"Only Reasons"}},a=new class{constructor(){this.setLocale=t=>{this.locale=t&&u[t]?t:"en"},this.getLocale=()=>this.locale;const t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}getString(t,n){const r=u[this.locale][t];if(!r)return"";if(!n)return r;const e=r.split(n.pattern);return e.length>1?[e[0],n.replacer,e[1]]:r}};export{i as a,s as d,a as l}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{Q as a,S as r,y as s,W as d,I as n,T as o,V as l,U as h,t as c}from"./p-bbf0fd6c.js";import{b as p}from"./p-cff9655c.js";import{l as b,a as g}from"./p-ed58acd0.js";import{X as u,a as m,C as x}from"./p-5a898f51.js";import{g as v,R as f,G as w,a as y,B as k,S as L,T as I,b as S,c as _,d as A,E as N,M as j,I as K,e as D,P as C}from"./p-53aac672.js";
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const E=(e,i)=>{const{attribute:a}=e;return[t(f,{name:"Name",value:v(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},P=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(f,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},z=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(P,{name:i.value}))},T=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Code Authority",value:""}),t(w,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Code Id",value:""}),t(w,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Short Name",value:i.value.shortName}),t(f,{name:"Short Description",value:i.value.shortDescription}))},H=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Assessment Authority",value:""}),t(w,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Assessment Location",value:""}),t(w,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Assessment Ref",value:""}),t(w,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(f,{name:"Description",value:i.value.description}))},V=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},O=e=>{const{attribute:i}=e;return t(E,{attribute:i},Object.keys(i.value).map((e=>t(f,{name:e,value:i.value[e].toNumber()?b.getString("yes"):b.getString("no")}))))},$=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},q=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[$(i.value[e]),t("br",null)]));return t(E,{attribute:i},t(f,{name:"Value",value:a}))},R=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value,monospace:!0}))},W=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value.utf8String}))},B=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value.toString()}))},G=e=>{const{attributes:i}=e;return i&&i.length?[t(y,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?z:e.value instanceof s?T:e.value instanceof d?H:e.value instanceof n?V:e.value instanceof o?O:e.value instanceof l?q:e.value instanceof h?W:e.value instanceof c?B:"string"==typeof e.value?R:E,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},M=e=>{const{issuer:i}=e;return i?[t(y,{value:b.getString("issuer")}),i.map((e=>t(w,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},Q=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(y,{value:b.getString("holder")}),a&&[a.issuer.map((e=>t(w,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(f,{name:b.getString("serialNumber"),value:p.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(f,{name:b.getString("digestInfo"),value:""}),t(f,{name:b.getString("algorithm"),value:v(r.digestAlgorithm.algorithm)}),t(f,{name:b.getString("value"),value:p.Convert.ToHex(r.objectDigest),monospace:!0}),t(f,{name:b.getString("type"),value:r.digestedObjectType})]]},U=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof u)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new u(t)}this.certificateDecoded.parseExtensions(),this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof u&&e instanceof u&&t.serialNumber!==e.serialNumber&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,null,t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(M,{issuer:this.certificateDecoded.issuer}),t(Q,{holder:this.certificateDecoded.holder}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(G,{attributes:this.certificateDecoded.attributes,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(N,{extensions:this.certificateDecoded.extensions,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(j,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/U.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
const X=e=>{const{certificates:i}=e;return[t(y,{value:b.getString("revokedCertificates")}),i.map((e=>[t(f,{name:b.getString("serialNumber"),value:p.Convert.ToHex(e.userCertificate),monospace:!0}),t(f,{name:b.getString("revocation"),value:g(e.revocationDate.getTime())}),t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]))]},F=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof m)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new m(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}getIssuerDnLink(){return this.issuerDnLink}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof m&&e instanceof m&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate revocation list."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate revocation list available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,{"data-view":this.view},t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(K,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(N,{extensions:this.certificateDecoded.extensions,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),this.certificateDecoded.asn.tbsCertList.revokedCertificates&&t(X,{certificates:this.certificateDecoded.asn.tbsCertList.revokedCertificates}),this.download&&t(j,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};F.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";const J=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>t,this.getAuthKeyIdSiblingsLink=t=>t,this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof x)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new x(t)}this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof x&&e instanceof x&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))}getExtensionRequestAttribute(){if(this.certificateDecoded)return this.certificateDecoded.attributes.find((t=>"1.2.840.113549.1.9.14"===t.asn.type))}render(){if(this.certificateDecodeError)return this.renderErrorState();if(!this.certificateDecoded)return this.renderEmptyState();const e=this.getExtensionRequestAttribute();return t(i,{"data-view":this.view},t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(D,{name:this.certificateDecoded.subject}),t(C,{publicKey:this.certificateDecoded.publicKey}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(G,{attributes:this.certificateDecoded.attributes,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(N,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(j,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};J.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{U as peculiar_attribute_certificate_viewer,F as peculiar_crl_viewer,J as peculiar_csr_viewer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),
|
|
4
|
+
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),a=r["data-opts"]||{};return a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const a=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[a]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const s=new Map;t[a]=i=>{const n=new URL(i,c).href;let l=s.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${a}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[a].m),i.remove()}})),s.set(n,l),e.head.appendChild(i)}return l}}})(a.resourcesUrl,r),t.customElements?c(a):__sc_import_peculiar("./p-9f4ee110.js").then((()=>a))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-7ef69178",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-10aa0b03",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-318a1e9f",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-ff867be1",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-652f77d0",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
9
|
-
import { X509Certificate, X509AttributeCertificate, CSR } from '../../crypto';
|
|
9
|
+
import { X509Certificate, X509AttributeCertificate, CSR, CRL } from '../../crypto';
|
|
10
10
|
export declare class CertificateDecoder {
|
|
11
11
|
private inputPaste?;
|
|
12
12
|
/**
|
|
@@ -17,7 +17,7 @@ export declare class CertificateDecoder {
|
|
|
17
17
|
* The default certificate value for decode and show details. Use PEM or DER.
|
|
18
18
|
*/
|
|
19
19
|
defaultCertificate?: string;
|
|
20
|
-
certificateDecoded: X509Certificate | X509AttributeCertificate | CSR;
|
|
20
|
+
certificateDecoded: X509Certificate | X509AttributeCertificate | CSR | CRL;
|
|
21
21
|
/**
|
|
22
22
|
* Emitted when the certificate has been successfully parsed.
|
|
23
23
|
*/
|
|
@@ -33,7 +33,7 @@ export declare class CertificateDecoder {
|
|
|
33
33
|
private onChangeInputFile;
|
|
34
34
|
private onDropFile;
|
|
35
35
|
clearValue(): void;
|
|
36
|
-
setValue(value: X509Certificate | X509AttributeCertificate | CSR): void;
|
|
36
|
+
setValue(value: X509Certificate | X509AttributeCertificate | CSR | CRL): void;
|
|
37
37
|
decode(certificate: string): void;
|
|
38
38
|
render(): any;
|
|
39
39
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { FunctionalComponent } from '../../../stencil-public-runtime';
|
|
9
|
+
import { CRLNumber } from '@peculiar/asn1-x509';
|
|
10
|
+
import { Extension } from '../../../crypto/extension';
|
|
11
|
+
interface ICRLNumberExtensionProps {
|
|
12
|
+
extension: Extension<CRLNumber>;
|
|
13
|
+
}
|
|
14
|
+
export declare const CRLNumberExtension: FunctionalComponent<ICRLNumberExtensionProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { FunctionalComponent } from '../../../stencil-public-runtime';
|
|
9
|
+
import { IssuingDistributionPoint } from '@peculiar/asn1-x509';
|
|
10
|
+
import { Extension } from '../../../crypto/extension';
|
|
11
|
+
interface IIssuingDistributionPointExtensionProps extends IGeneralNameOptions {
|
|
12
|
+
extension: Extension<IssuingDistributionPoint>;
|
|
13
|
+
}
|
|
14
|
+
export declare const IssuingDistributionPointExtension: FunctionalComponent<IIssuingDistributionPointExtensionProps>;
|
|
15
|
+
export {};
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import { FunctionalComponent } from '../../stencil-public-runtime';
|
|
9
|
-
import { X509Certificate, X509AttributeCertificate, CSR } from '../../crypto';
|
|
10
|
-
declare type CertificateType = X509Certificate | X509AttributeCertificate | CSR;
|
|
9
|
+
import { X509Certificate, X509AttributeCertificate, CSR, CRL } from '../../crypto';
|
|
10
|
+
declare type CertificateType = X509Certificate | X509AttributeCertificate | CSR | CRL;
|
|
11
11
|
interface IMiscellaneousProps {
|
|
12
12
|
certificate: CertificateType;
|
|
13
13
|
}
|
|
@@ -12,7 +12,7 @@ interface IRowTitleProps {
|
|
|
12
12
|
export declare const RowTitle: FunctionalComponent<IRowTitleProps>;
|
|
13
13
|
interface IRowValueProps {
|
|
14
14
|
name: string | string[];
|
|
15
|
-
value: string | number;
|
|
15
|
+
value: string | number | string[];
|
|
16
16
|
monospace?: boolean;
|
|
17
17
|
collapse?: boolean;
|
|
18
18
|
href?: string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { CRL } from '../../crypto';
|
|
9
|
+
export declare type CrlProp = string | CRL;
|
|
10
|
+
export declare class CrlViewer {
|
|
11
|
+
certificateDecoded: CRL;
|
|
12
|
+
certificateDecodeError: Error;
|
|
13
|
+
/**
|
|
14
|
+
* The certificate value for decode and show details. Use PEM or DER.
|
|
15
|
+
*/
|
|
16
|
+
certificate: CrlProp;
|
|
17
|
+
/**
|
|
18
|
+
* If `true` - component will show split-button to download certificate as PEM or DER.
|
|
19
|
+
*/
|
|
20
|
+
download?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Authority Key Identifier extension parent link.
|
|
23
|
+
* <br />
|
|
24
|
+
* **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
25
|
+
* @example
|
|
26
|
+
* https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}
|
|
27
|
+
*/
|
|
28
|
+
authKeyIdParentLink?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Authority Key Identifier extension siblings link.
|
|
31
|
+
* <br />
|
|
32
|
+
* **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
33
|
+
* @example
|
|
34
|
+
* https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}
|
|
35
|
+
*/
|
|
36
|
+
authKeyIdSiblingsLink?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Issuer DN link.
|
|
39
|
+
* **NOTE**: HTML component attribute must be `issuer-dn-link`.
|
|
40
|
+
*/
|
|
41
|
+
issuerDnLink?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Choose view type instead @media.
|
|
44
|
+
*/
|
|
45
|
+
view?: 'mobile';
|
|
46
|
+
isDecodeInProcess: boolean;
|
|
47
|
+
componentWillLoad(): void;
|
|
48
|
+
private decodeCertificate;
|
|
49
|
+
private getAuthKeyIdParentLink;
|
|
50
|
+
private getAuthKeyIdSiblingsLink;
|
|
51
|
+
private getIssuerDnLink;
|
|
52
|
+
/**
|
|
53
|
+
* Rerun decodeCertificate if previuos value not equal current value
|
|
54
|
+
*/
|
|
55
|
+
watchCertificateAndDecode(newValue: CrlProp, oldValue: CrlProp): void;
|
|
56
|
+
private renderErrorState;
|
|
57
|
+
private renderEmptyState;
|
|
58
|
+
render(): any;
|
|
59
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { RevokedCertificate } from '@peculiar/asn1-x509';
|
|
9
|
+
import { FunctionalComponent } from '../../stencil-public-runtime';
|
|
10
|
+
interface IRevokedCertificatesProps {
|
|
11
|
+
certificates: RevokedCertificate[];
|
|
12
|
+
}
|
|
13
|
+
export declare const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps>;
|
|
14
|
+
export {};
|
|
@@ -10,6 +10,7 @@ import { IAction } from "./components/button-split/button-split";
|
|
|
10
10
|
import { X509Certificate } from "./crypto";
|
|
11
11
|
import { CertificateProp } from "./components/certificate-viewer/certificate-viewer";
|
|
12
12
|
import { ICertificate } from "./components/certificates-viewer/certificates-viewer";
|
|
13
|
+
import { CrlProp } from "./components/crl-viewer/crl-viewer";
|
|
13
14
|
import { CsrProp } from "./components/csr-viewer/csr-viewer";
|
|
14
15
|
import { ColorType } from "./interface";
|
|
15
16
|
export namespace Components {
|
|
@@ -140,6 +141,34 @@ export namespace Components {
|
|
|
140
141
|
*/
|
|
141
142
|
"width": number;
|
|
142
143
|
}
|
|
144
|
+
interface PeculiarCrlViewer {
|
|
145
|
+
/**
|
|
146
|
+
* Authority Key Identifier extension parent link. <br /> **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
147
|
+
* @example https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}
|
|
148
|
+
*/
|
|
149
|
+
"authKeyIdParentLink"?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Authority Key Identifier extension siblings link. <br /> **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
152
|
+
* @example https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}
|
|
153
|
+
*/
|
|
154
|
+
"authKeyIdSiblingsLink"?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The certificate value for decode and show details. Use PEM or DER.
|
|
157
|
+
*/
|
|
158
|
+
"certificate": CrlProp;
|
|
159
|
+
/**
|
|
160
|
+
* If `true` - component will show split-button to download certificate as PEM or DER.
|
|
161
|
+
*/
|
|
162
|
+
"download"?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Issuer DN link. **NOTE**: HTML component attribute must be `issuer-dn-link`.
|
|
165
|
+
*/
|
|
166
|
+
"issuerDnLink"?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Choose view type instead @media.
|
|
169
|
+
*/
|
|
170
|
+
"view"?: 'mobile';
|
|
171
|
+
}
|
|
143
172
|
interface PeculiarCsrViewer {
|
|
144
173
|
/**
|
|
145
174
|
* The certificate value for decode and show details. Use PEM or DER.
|
|
@@ -258,6 +287,12 @@ declare global {
|
|
|
258
287
|
prototype: HTMLPeculiarCircularProgressElement;
|
|
259
288
|
new (): HTMLPeculiarCircularProgressElement;
|
|
260
289
|
};
|
|
290
|
+
interface HTMLPeculiarCrlViewerElement extends Components.PeculiarCrlViewer, HTMLStencilElement {
|
|
291
|
+
}
|
|
292
|
+
var HTMLPeculiarCrlViewerElement: {
|
|
293
|
+
prototype: HTMLPeculiarCrlViewerElement;
|
|
294
|
+
new (): HTMLPeculiarCrlViewerElement;
|
|
295
|
+
};
|
|
261
296
|
interface HTMLPeculiarCsrViewerElement extends Components.PeculiarCsrViewer, HTMLStencilElement {
|
|
262
297
|
}
|
|
263
298
|
var HTMLPeculiarCsrViewerElement: {
|
|
@@ -297,6 +332,7 @@ declare global {
|
|
|
297
332
|
"peculiar-certificate-viewer": HTMLPeculiarCertificateViewerElement;
|
|
298
333
|
"peculiar-certificates-viewer": HTMLPeculiarCertificatesViewerElement;
|
|
299
334
|
"peculiar-circular-progress": HTMLPeculiarCircularProgressElement;
|
|
335
|
+
"peculiar-crl-viewer": HTMLPeculiarCrlViewerElement;
|
|
300
336
|
"peculiar-csr-viewer": HTMLPeculiarCsrViewerElement;
|
|
301
337
|
"peculiar-highlight-words": HTMLPeculiarHighlightWordsElement;
|
|
302
338
|
"peculiar-link": HTMLPeculiarLinkElement;
|
|
@@ -448,6 +484,34 @@ declare namespace LocalJSX {
|
|
|
448
484
|
*/
|
|
449
485
|
"width"?: number;
|
|
450
486
|
}
|
|
487
|
+
interface PeculiarCrlViewer {
|
|
488
|
+
/**
|
|
489
|
+
* Authority Key Identifier extension parent link. <br /> **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
490
|
+
* @example https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}
|
|
491
|
+
*/
|
|
492
|
+
"authKeyIdParentLink"?: string;
|
|
493
|
+
/**
|
|
494
|
+
* Authority Key Identifier extension siblings link. <br /> **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.
|
|
495
|
+
* @example https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}
|
|
496
|
+
*/
|
|
497
|
+
"authKeyIdSiblingsLink"?: string;
|
|
498
|
+
/**
|
|
499
|
+
* The certificate value for decode and show details. Use PEM or DER.
|
|
500
|
+
*/
|
|
501
|
+
"certificate"?: CrlProp;
|
|
502
|
+
/**
|
|
503
|
+
* If `true` - component will show split-button to download certificate as PEM or DER.
|
|
504
|
+
*/
|
|
505
|
+
"download"?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Issuer DN link. **NOTE**: HTML component attribute must be `issuer-dn-link`.
|
|
508
|
+
*/
|
|
509
|
+
"issuerDnLink"?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Choose view type instead @media.
|
|
512
|
+
*/
|
|
513
|
+
"view"?: 'mobile';
|
|
514
|
+
}
|
|
451
515
|
interface PeculiarCsrViewer {
|
|
452
516
|
/**
|
|
453
517
|
* The certificate value for decode and show details. Use PEM or DER.
|
|
@@ -514,6 +578,7 @@ declare namespace LocalJSX {
|
|
|
514
578
|
"peculiar-certificate-viewer": PeculiarCertificateViewer;
|
|
515
579
|
"peculiar-certificates-viewer": PeculiarCertificatesViewer;
|
|
516
580
|
"peculiar-circular-progress": PeculiarCircularProgress;
|
|
581
|
+
"peculiar-crl-viewer": PeculiarCrlViewer;
|
|
517
582
|
"peculiar-csr-viewer": PeculiarCsrViewer;
|
|
518
583
|
"peculiar-highlight-words": PeculiarHighlightWords;
|
|
519
584
|
"peculiar-link": PeculiarLink;
|
|
@@ -533,6 +598,7 @@ declare module "@stencil/core" {
|
|
|
533
598
|
"peculiar-certificate-viewer": LocalJSX.PeculiarCertificateViewer & JSXBase.HTMLAttributes<HTMLPeculiarCertificateViewerElement>;
|
|
534
599
|
"peculiar-certificates-viewer": LocalJSX.PeculiarCertificatesViewer & JSXBase.HTMLAttributes<HTMLPeculiarCertificatesViewerElement>;
|
|
535
600
|
"peculiar-circular-progress": LocalJSX.PeculiarCircularProgress & JSXBase.HTMLAttributes<HTMLPeculiarCircularProgressElement>;
|
|
601
|
+
"peculiar-crl-viewer": LocalJSX.PeculiarCrlViewer & JSXBase.HTMLAttributes<HTMLPeculiarCrlViewerElement>;
|
|
536
602
|
"peculiar-csr-viewer": LocalJSX.PeculiarCsrViewer & JSXBase.HTMLAttributes<HTMLPeculiarCsrViewerElement>;
|
|
537
603
|
"peculiar-highlight-words": LocalJSX.PeculiarHighlightWords & JSXBase.HTMLAttributes<HTMLPeculiarHighlightWordsElement>;
|
|
538
604
|
"peculiar-link": LocalJSX.PeculiarLink & JSXBase.HTMLAttributes<HTMLPeculiarLinkElement>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CertificateList } from '@peculiar/asn1-x509';
|
|
2
|
+
import { Extension, TExtensionValue } from './extension';
|
|
3
|
+
import { AsnData } from './asn_data';
|
|
4
|
+
import { INameJSON } from './name';
|
|
5
|
+
interface ISignature {
|
|
6
|
+
algorithm: string;
|
|
7
|
+
value: BufferSource;
|
|
8
|
+
}
|
|
9
|
+
export declare class CRL extends AsnData<CertificateList> {
|
|
10
|
+
readonly issuer: INameJSON[];
|
|
11
|
+
readonly version: number;
|
|
12
|
+
readonly lastUpdate: Date;
|
|
13
|
+
readonly nextUpdate: Date;
|
|
14
|
+
extensions: Extension<TExtensionValue>[];
|
|
15
|
+
thumbprints: Record<string, string>;
|
|
16
|
+
type: string;
|
|
17
|
+
constructor(raw: string);
|
|
18
|
+
getThumbprint(algorithm?: globalThis.AlgorithmIdentifier): Promise<void>;
|
|
19
|
+
get signature(): ISignature;
|
|
20
|
+
get commonName(): string;
|
|
21
|
+
parseExtensions(): void;
|
|
22
|
+
exportAsBase64(): string;
|
|
23
|
+
exportAsHexFormatted(): string;
|
|
24
|
+
exportAsPemFormatted(): string;
|
|
25
|
+
downloadAsPEM(name?: string): void;
|
|
26
|
+
downloadAsDER(name?: string): void;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
import { Extension as AsnExtension, AuthorityInfoAccessSyntax, AuthorityKeyIdentifier, BasicConstraints, CertificateIssuer, CertificatePolicies, CRLDistributionPoints, CRLReason, ExtendedKeyUsage, InhibitAnyPolicy, InvalidityDate, KeyUsage, NameConstraints, PolicyConstraints, PolicyMappings, SubjectDirectoryAttributes, SubjectKeyIdentifier, PrivateKeyUsagePeriod, EntrustVersionInfo, SubjectInfoAccessSyntax } from '@peculiar/asn1-x509';
|
|
8
|
+
import { Extension as AsnExtension, AuthorityInfoAccessSyntax, AuthorityKeyIdentifier, BasicConstraints, CertificateIssuer, CertificatePolicies, CRLDistributionPoints, IssuingDistributionPoint, CRLReason, ExtendedKeyUsage, InhibitAnyPolicy, InvalidityDate, KeyUsage, NameConstraints, PolicyConstraints, PolicyMappings, SubjectDirectoryAttributes, SubjectKeyIdentifier, PrivateKeyUsagePeriod, EntrustVersionInfo, SubjectInfoAccessSyntax, CRLNumber, BaseCRLNumber } from '@peculiar/asn1-x509';
|
|
9
9
|
import { QCStatements, BiometricSyntax } from '@peculiar/asn1-x509-qualified';
|
|
10
10
|
import { CertificateTemplate, EnrollCertTypeChoice, CaVersion } from '@peculiar/asn1-x509-microsoft';
|
|
11
11
|
import { NetscapeComment, NetscapeCertType } from '@peculiar/asn1-x509-netscape';
|
|
@@ -15,7 +15,7 @@ import { Timestamp, ArchiveRevInfo } from '@peculiar/asn1-adobe-acrobat';
|
|
|
15
15
|
import { LogotypeExtn } from '@peculiar/asn1-x509-logotype';
|
|
16
16
|
import { TNAuthorizationList } from '@peculiar/asn1-rfc8226';
|
|
17
17
|
import { AsnData } from './asn_data';
|
|
18
|
-
export declare type TExtensionValue = AuthorityInfoAccessSyntax | AuthorityKeyIdentifier | BasicConstraints | CertificateIssuer | CertificatePolicies | CRLDistributionPoints | CRLReason | ExtendedKeyUsage | InhibitAnyPolicy | InvalidityDate | NameConstraints | PolicyConstraints | PolicyMappings | SubjectDirectoryAttributes | SubjectKeyIdentifier | QCStatements | CertificateTemplate | EnrollCertTypeChoice | NetscapeComment | LeiChoice | LeiRole | CertificateTransparency | Timestamp | ArchiveRevInfo | KeyUsage | NetscapeCertType | CaVersion | PrivateKeyUsagePeriod | EntrustVersionInfo | BiometricSyntax | LogotypeExtn | TNAuthorizationList | SubjectInfoAccessSyntax | string;
|
|
18
|
+
export declare type TExtensionValue = AuthorityInfoAccessSyntax | AuthorityKeyIdentifier | BasicConstraints | CertificateIssuer | CertificatePolicies | CRLDistributionPoints | IssuingDistributionPoint | CRLReason | ExtendedKeyUsage | InhibitAnyPolicy | InvalidityDate | NameConstraints | PolicyConstraints | PolicyMappings | SubjectDirectoryAttributes | SubjectKeyIdentifier | QCStatements | CertificateTemplate | EnrollCertTypeChoice | NetscapeComment | LeiChoice | LeiRole | CertificateTransparency | Timestamp | ArchiveRevInfo | KeyUsage | NetscapeCertType | CaVersion | PrivateKeyUsagePeriod | EntrustVersionInfo | BiometricSyntax | LogotypeExtn | TNAuthorizationList | SubjectInfoAccessSyntax | CRLNumber | BaseCRLNumber | string;
|
|
19
19
|
export declare class Extension<T extends TExtensionValue> extends AsnData<AsnExtension> {
|
|
20
20
|
readonly value: T;
|
|
21
21
|
private getAsnExtnValue;
|
|
@@ -35,5 +35,7 @@ export declare class X509AttributeCertificate extends AsnData<AttributeCertifica
|
|
|
35
35
|
exportAsHexFormatted(): string;
|
|
36
36
|
exportAsPemFormatted(): string;
|
|
37
37
|
get commonName(): string;
|
|
38
|
+
downloadAsPEM(name?: string): void;
|
|
39
|
+
downloadAsDER(name?: string): void;
|
|
38
40
|
}
|
|
39
41
|
export {};
|
|
@@ -6,11 +6,19 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Download {
|
|
9
|
-
static
|
|
9
|
+
static cert: {
|
|
10
10
|
asPEM: (pem: string, name: string) => void;
|
|
11
11
|
asDER: (hex: string, name: string) => void;
|
|
12
12
|
};
|
|
13
|
-
static
|
|
13
|
+
static attrCert: {
|
|
14
|
+
asPEM: (pem: string, name: string) => void;
|
|
15
|
+
asDER: (hex: string, name: string) => void;
|
|
16
|
+
};
|
|
17
|
+
static csr: {
|
|
18
|
+
asPEM: (pem: string, name: string) => void;
|
|
19
|
+
asDER: (hex: string, name: string) => void;
|
|
20
|
+
};
|
|
21
|
+
static crl: {
|
|
14
22
|
asPEM: (pem: string, name: string) => void;
|
|
15
23
|
asDER: (hex: string, name: string) => void;
|
|
16
24
|
};
|
|
@@ -27,6 +27,8 @@ declare const MESSAGES_ALL: {
|
|
|
27
27
|
validity: string;
|
|
28
28
|
issued: string;
|
|
29
29
|
expired: string;
|
|
30
|
+
lastUpdate: string;
|
|
31
|
+
nextUpdate: string;
|
|
30
32
|
algorithm: string;
|
|
31
33
|
namedCurve: string;
|
|
32
34
|
exponent: string;
|
|
@@ -46,6 +48,15 @@ declare const MESSAGES_ALL: {
|
|
|
46
48
|
holder: string;
|
|
47
49
|
digestInfo: string;
|
|
48
50
|
type: string;
|
|
51
|
+
revokedCertificates: string;
|
|
52
|
+
revocation: string;
|
|
53
|
+
yes: string;
|
|
54
|
+
no: string;
|
|
55
|
+
onlyUserCertificates: string;
|
|
56
|
+
onlyAttributeCertificates: string;
|
|
57
|
+
onlyCACertificates: string;
|
|
58
|
+
indirectCRL: string;
|
|
59
|
+
onlyReasons: string;
|
|
49
60
|
};
|
|
50
61
|
};
|
|
51
62
|
export declare type SupportedMessagesType = keyof typeof MESSAGES_ALL;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export declare const isHex: (value: string) => boolean;
|
|
9
9
|
export declare const isPem: (value: string) => boolean;
|
|
10
10
|
export declare const isX509Pem: (value: string) => boolean;
|
|
11
|
+
export declare const isX509CRLPem: (value: string) => boolean;
|
|
11
12
|
export declare const isPkcs10Pem: (value: string) => boolean;
|
|
12
13
|
export declare const isX509AttributePem: (value: string) => boolean;
|
|
13
14
|
export declare const isBase64: (value: string) => boolean;
|