@peculiar/certificates-viewer 3.1.0 → 3.2.0
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-878e786a.js → certification_request-cde57123.js} +137 -266
- package/dist/cjs/csr-78378ed0.js +150 -0
- package/dist/cjs/download-6724f3a7.js +79 -0
- package/dist/cjs/{download-5e7d5455.js → index-ff818d4d.js} +0 -72
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/l10n-a048a686.js +145 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_2.cjs.entry.js +479 -0
- package/dist/cjs/peculiar-button_5.cjs.entry.js +148 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +173 -0
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +124 -0
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -4
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/public_key-e56dbe52.js +1104 -0
- package/dist/cjs/x509_attribute_certificate-cc325b70.js +87 -0
- package/dist/cjs/x509_certificate-51a97033.js +139 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +54 -23
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/www-copy/index.js +80 -0
- package/dist/esm/{certification_request-3402a181.js → certification_request-c0674647.js} +76 -205
- package/dist/esm/csr-c1b6a176.js +147 -0
- package/dist/esm/download-735fb2eb.js +76 -0
- package/dist/esm/{download-cf68ac2c.js → index-0ba131b0.js} +1 -71
- package/dist/esm/index.js +2 -1
- package/dist/esm/l10n-ac28fa92.js +141 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_2.entry.js +474 -0
- package/dist/esm/peculiar-button_5.entry.js +140 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +169 -0
- package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +120 -0
- package/dist/esm/peculiar-certificates-viewer.entry.js +5 -3
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/public_key-43b2cbf0.js +1089 -0
- package/dist/esm/x509_attribute_certificate-a6d4aa15.js +85 -0
- package/dist/esm/x509_certificate-12f6d344.js +137 -0
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-006865d7.js +4 -0
- package/dist/peculiar/p-17c4da7b.js +11 -0
- package/dist/peculiar/p-1ebab45c.js +78 -0
- package/dist/peculiar/{p-b09a1f0b.entry.js → p-38635919.entry.js} +1 -1
- package/dist/peculiar/p-3f8d1008.entry.js +4 -0
- package/dist/peculiar/p-42da7f97.js +11 -0
- package/dist/peculiar/p-464e0943.js +87 -0
- package/dist/peculiar/p-4f4c1d30.js +12 -0
- package/dist/peculiar/p-530afe84.entry.js +11 -0
- package/dist/peculiar/p-6011646e.entry.js +11 -0
- package/dist/peculiar/p-6c510523.js +18 -0
- package/dist/peculiar/p-d7a13cb4.js +18 -0
- package/dist/peculiar/p-dafae164.entry.js +4 -0
- package/dist/peculiar/p-e77d0ccc.entry.js +18 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +13 -1
- package/dist/types/components.d.ts +20 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +2 -3
- package/dist/cjs/l10n-d4a77087.js +0 -767
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +0 -2187
- package/dist/collection/utils/history.js +0 -19
- package/dist/collection/utils/parse_hash.js +0 -28
- package/dist/collection/utils/query_stringify.js +0 -21
- package/dist/esm/l10n-9ac63748.js +0 -762
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +0 -2175
- package/dist/peculiar/p-08538084.entry.js +0 -113
- package/dist/peculiar/p-3fc37750.entry.js +0 -4
- package/dist/peculiar/p-8ad24aa3.js +0 -87
- package/dist/peculiar/p-99797a49.js +0 -34
- package/dist/peculiar/p-c774ec0b.js +0 -18
- package/dist/types/utils/history.d.ts +0 -9
- package/dist/types/utils/parse_hash.d.ts +0 -9
- package/dist/types/utils/query_stringify.d.ts +0 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{c as t,a as n}from"./p-d0b55fbb.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",i="second",e="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+)?$/,m=/\[([^\]]+)]|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,v={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("_")},M=function(t,n,r){var i=String(t);return!i||i.length>=n?t:""+Array(n+1-i.length).join(r)+t},y={s:M,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),i=Math.floor(r/60),e=r%60;return(n<=0?"+":"-")+M(i,2,"0")+":"+M(e,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var i=12*(r.year()-n.year())+(r.month()-n.month()),e=n.clone().add(i,o),s=r-e<0,u=n.clone().add(i+(s?-1:1),o);return+(-(i+(r-e)/(s?e-u:u-e))||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:e,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",g={};g[D]=v;var p=function(t){return t instanceof _},w=function t(n,r,i){var e;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();g[s]&&(e=s),r&&(g[s]=r,e=s);var u=n.split("-");if(!e&&u.length>1)return t(u[0])}else{var a=n.name;g[a]=n,e=a}return!i&&e&&(D=e),e||!i&&D},S=function(t,n){if(p(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=y;b.l=w,b.i=p,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function v(t){this.$L=w(t.locale,null,!0),this.parse(t)}var M=v.prototype;return M.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 i=n.match(l);if(i){var e=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},M.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()},M.$utils=function(){return b},M.isValid=function(){return!(this.$d.toString()===d)},M.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},M.isAfter=function(t,n){return S(t)<this.startOf(n)},M.isBefore=function(t,n){return this.endOf(n)<S(t)},M.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var i=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?i:i.endOf(u)},m=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)},v=this.$W,M=this.$M,y=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,M):l(0,M+1);case a:var g=this.$locale().weekStart||0,p=(v<g?v+7:v)-g;return l(h?y-p:y+(6-p),M);case u:case f:return m(D+"Hours",0);case s:return m(D+"Minutes",1);case e:return m(D+"Seconds",2);case i:return m(D+"Milliseconds",3);default:return this.clone()}},M.endOf=function(t){return this.startOf(t,!1)},M.$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[e]=d+"Minutes",a[i]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],m=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var v=this.clone().set(f,1);v.$d[l](m),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](m);return this.init(),this},M.set=function(t,n){return this.clone().$set(t,n)},M.get=function(t){return this[b.p(t)]()},M.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),m=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 m(1);if(l===a)return m(7);var v=(f={},f[e]=t,f[s]=n,f[i]=1e3,f)[l]||1,M=this.$d.getTime()+r*v;return b.w(M,this)},M.subtract=function(t,n){return this.add(-1*t,n)},M.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",e=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,e,s){return t&&(t[r]||t(n,i))||e[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i},v={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:e};return i.replace(m,(function(t,n){return n||v[t]||e.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(r,f,d){var l,m=b.p(f),v=S(r),M=(v.utcOffset()-this.utcOffset())*t,y=this-v,D=b.m(this,v);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(y-M)/6048e5,l[u]=(y-M)/864e5,l[s]=y/n,l[e]=y/t,l[i]=y/1e3,l)[m]||y,d?D:b.a(D)},M.daysInMonth=function(){return this.endOf(o).$D},M.$locale=function(){return g[this.$L]},M.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),i=w(t,n,!0);return i&&(r.$L=i),r},M.clone=function(){return b.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),N=_.prototype;return S.prototype=N,[["$ms",r],["$s",i],["$m",e],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){N[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=p,S.unix=function(t){return S(1e3*t)},S.en=g[D],S.Ls=g,S.p={},S}()})),i=t((function(t){t.exports=function(t,n,r){t=t||{};var i=n.prototype,e={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,e){return i.fromToBase(t,n,r,e)}r.en.relativeTime=e,i.fromToBase=function(n,i,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||e,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,m=0;m<l;m+=1){var v=d[m];v.d&&(o=u?r(n).diff(s,v.d,!0):s.diff(n,v.d,!0));var M=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,M<=v.r||!v.r){M<=1&&m>0&&(v=d[m-1]);var y=f[v.l];a&&(M=a(""+M)),h="string"==typeof y?y.replace("%d",M):y(M,i,v.l,c);break}}if(i)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},i.to=function(t,n){return s(t,n,this,!0)},i.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};i.toNow=function(t){return this.to(u(this),t)},i.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(i);const e=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const i=r(t),e=r(n);return i.to(e,!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",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"}},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 i=r.split(n.pattern);return i.length>1?[i[0],n.replacer,i[1]]:r}};export{e as a,s as d,a as l}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{h as t,r as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-17c4da7b.js";import"./p-464e0943.js";import"./p-006865d7.js";import{l as r}from"./p-4f4c1d30.js";import{a as d,R as s,B as o,e as n,P as l,S as p,T as h,E as c,b,c as g,d as m,M as x}from"./p-1ebab45c.js";import"./p-d0b55fbb.js";import"./p-6c510523.js";import"./p-d7a13cb4.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 u=i=>{const{name:e,issuerDnLink:a}=i,o=r.getString("issuerName");return[t(d,{value:a?t("peculiar-link",{href:a,type:"h6"},o):o}),e.map((i=>t(s,{name:i.name||i.type,value:i.value})))]},f=class{constructor(t){i(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(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}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(e,{"data-view":this.view},t("table",null,t(o,Object.assign({},this.certificateDecoded)),t(n,{name:this.certificateDecoded.subject}),t(u,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(l,{publicKey:this.certificateDecoded.publicKey}),t(p,{signature:this.certificateDecoded.signature}),t(h,{thumbprints:this.certificateDecoded.thumbprints}),t(c,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:g,getIPAddressLink:m,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(x,{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}";export{f as peculiar_certificate_viewer}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as i,h as e,H as o}from"./p-f7683ba5.js";import{i as s,a as r,b as a,c}from"./p-464e0943.js";import"./p-4f4c1d30.js";import{X as n}from"./p-17c4da7b.js";import{X as l}from"./p-42da7f97.js";import{C as p}from"./p-6c510523.js";import"./p-006865d7.js";import"./p-d0b55fbb.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
|
+
*/function h(t){return new Promise(((i,e)=>{const o=new FileReader;o.onload=()=>i({value:o.result,fileName:t.name,fileSize:t.size,sourceMime:t.type}),o.onerror=()=>e(o.error),o.readAsBinaryString(t)}))}const d=class{constructor(e){t(this,e),this.successParse=i(this,"successParse",7),this.clearCertificate=i(this,"clearCertificate",7),this.onClickDecode=()=>{const{value:t}=this.inputPaste;t&&this.decode(t)},this.onClickExample=()=>{this.decode(this.certificateExample)},this.onClickClear=()=>{this.clearValue()},this.onChangeInputFile=async t=>{const i=t.target;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value),i.value=""}},this.onDropFile=async t=>{t.stopPropagation(),t.preventDefault();const i=t.dataTransfer;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value)}}}componentDidLoad(){this.defaultCertificate&&setTimeout((()=>this.decode(this.defaultCertificate)),100)}clearValue(){this.inputPaste.value="",this.certificateDecoded=null,this.clearCertificate.emit()}setValue(t){this.certificateDecoded=t,this.inputPaste.value=t.exportAsPemFormatted(),this.successParse.emit(t.exportAsBase64())}decode(t){const i=s(t),e=r(t),o=a(t),h=c(t);let d,f;if(i&&!(e||h||o))return this.clearValue(),void alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.");try{e&&(d=new n(t)),h&&(d=new l(t)),o&&(d=new p(t))}catch(t){f=t}if(!d)try{d=new n(t)}catch(t){f=t}if(!d)try{d=new l(t)}catch(t){f=t}if(!d)try{d=new p(t)}catch(t){f=t}d?this.setValue(d):(this.clearValue(),console.log(f),alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest."))}render(){return e(o,null,e("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:t=>{this.inputPaste=t},onDrop:this.onDropFile}),e("div",{class:"controls"},e("peculiar-button",{fill:"fill",class:"button",onClick:this.onClickDecode},"Decode"),e("peculiar-button",{class:"button"},"Choose file",e("input",{type:"file",class:"input_file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req",onChange:this.onChangeInputFile,value:""})),e("peculiar-button",{class:"button",onClick:this.onClickClear},"Clear"),this.certificateExample&&e("peculiar-button",{class:"button",onClick:this.onClickExample},"Example")),this.certificateDecoded instanceof n&&e("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof l&&e("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof p&&e("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}))}};d.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";export{d as peculiar_certificate_decoder}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{A as s,n as t,o as a,p as e,q as r,E as i,e as h,r as n,U as c,s as o,t as u,u as b,V as m,v as l,I as p,w as g,W as E,x as k,y as f,z as A,T as x,B as C,D as I,F as R,G as T,H as d,J as w,K as y,L as F,d as N,M as j,N as q,f as K,g as S,h as v,R as B,l as H,j as P,k as U}from"./p-464e0943.js";import{b as D}from"./p-006865d7.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
|
+
*/class G extends s{constructor(s){super(s,t);const N=this.getAsnExtnValue();switch(this.asn.type){case y:this.value=e.parse(N,F);break;case d:this.value=e.parse(N,w);break;case R:this.value=e.parse(N,T);break;case C:this.value=e.parse(N,I);break;case A:this.value=e.parse(N,x);break;case k:this.value=e.parse(N,f);break;case g:this.value=e.parse(N,E);break;case l:this.value=e.parse(N,p);break;case b:this.value=e.parse(N,m);break;case o:this.value=e.parse(N,u);break;case n:this.value=e.parse(N,c);break;case a:{const s=e.parse(N,r);this.value=s.map((s=>new i(h.serialize(s))));break}default:this.value=D.Convert.ToHex(N)}}getAsnExtnValue(){return this.asn.values[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 Q extends s{constructor(s){super(N(s),j),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new q(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===K&&t.parameters&&(a=h.parse(t.parameters,S)),t.algorithm===v&&(a=h.parse(s,B)),{params:a,value:h.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(s="SHA-1"){try{const t=await H(s,this.raw);t&&(this.thumbprints[s.name||s]=D.Convert.ToHex(t))}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;s.attributes&&(this.attributes=s.attributes.map((s=>new G(h.serialize(s)))))}exportAsBase64(){return D.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(D.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${U(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}export{G as A,Q as C}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{b as e}from"./p-006865d7.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
|
+
*/function t(e,t,o,n="application/octet-stream"){const c=new Blob([e],{type:n});if(navigator.msSaveBlob)return navigator.msSaveBlob(c,`${t}.${o}`),new Promise((e=>setTimeout(e,100)));const a=window.URL.createObjectURL(c),i=document.createElement("a"),s=document.createElement("iframe");return i.style.display="none",s.style.display="none",s.name=a,document.body.appendChild(s),i.href=a,i.target=a,i.download=`${t}.${o}`,document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),new Promise((e=>setTimeout((()=>{document.body.removeChild(s),e(void 0)}),100)))}
|
|
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 o{}o.x509={asPEM:(o,n)=>{t(e.Convert.FromString(o),n,"cer","application/pkix-cert")},asDER:(o,n)=>{t(e.Convert.FromString(o),n,"cer","application/pkix-cert")}},o.pkcs10={asPEM:(o,n)=>{t(e.Convert.FromString(o),n,"csr","application/pkcs10")},asDER:(o,n)=>{t(e.Convert.FromString(o),n,"csr","application/pkcs10")}};export{o as D,t as d}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,h as o,c as i,H as e}from"./p-f7683ba5.js";const r=class{constructor(o){t(this,o),this.fill="stroke",this.handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.onClick&&this.onClick(t)}}render(){const t=!!this.href;return o(t?"a":"button",{class:{button:!0,button_stroke:"stroke"===this.fill,button_fill:"fill"===this.fill,button_disabled:this.disabled},disabled:this.disabled,type:!t&&"button",href:t&&this.href,target:t&&this.target?this.target:null,rel:t&&"noreferrer noopener",onClick:this.handleClick,part:"base"},o("span",{part:"label",class:"button_label"},o("slot",null)))}};r.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:inline-block;width:auto;cursor:pointer;position:relative;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;--pv-button-padding-end:5px;--pv-button-padding-start:5px}.button{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);font-size:13px;font-size:var(--pv-font-size-b3);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;border-style:solid;border-width:1px;font-weight:400;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;cursor:inherit;height:30px;line-height:30px;border-radius:2px;padding:0 5px;padding:0 var(--pv-button-padding-end) 0 var(--pv-button-padding-start)}.button::-moz-focus-inner{border:0}.button:focus{outline:none;-webkit-box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1);box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1)}.button[disabled]{opacity:0.5;cursor:not-allowed}.button_stroke{border-color:rgba(53, 132, 247, 0.3);border-color:rgba(var(--pv-color-primary-rgb), 0.3);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);background-color:transparent}.button_fill{border-color:#3584f7;border-color:rgba(var(--pv-color-primary-rgb), 1);background-color:#3584f7;background-color:rgba(var(--pv-color-primary-rgb), 1);color:white;color:rgba(var(--pv-color-light-rgb), 1)}.button_label{-webkit-transition:opacity 200ms;transition:opacity 200ms}.button:hover .button_label{opacity:0.7}';const n=class{constructor(o){t(this,o),this.fill="stroke",this.actions=[],this.open=!1,this.onClickSplitButton=t=>{t.stopPropagation(),this.open=!this.open}}onClickActiveButton(t,o){this.open=!1,t(o)}renderActiveSplitState(){return this.open?o("div",{class:"button_split_container"},this.actions.map((t=>o("peculiar-button",{fill:"fill",class:"button_split_action",onClick:this.onClickActiveButton.bind(this,t.onClick)},t.text)))):null}render(){return o("div",{class:{button_split:!0}},o("peculiar-button",{fill:this.fill,onClick:this.onClick},o("slot",null)),o("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:!0,m_open:this.open}},o("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"button_split_icon"},o("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))),this.renderActiveSplitState())}};n.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:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}';const s=class{constructor(o){t(this,o),this.type="b3"}render(){return o("a",{href:this.href,target:"_blank",rel:"noreferrer noopener",class:{link:!0,[`link_type_${this.type||"b3"}`]:!0}},o("slot",null))}};s.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:inline-block}.link{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);font-weight:400;margin:0;padding:0;word-break:break-all}.link_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.link_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.link_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.link_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.link_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.link:hover{text-decoration:none}';const a=class{constructor(o){t(this,o),this.textExpand=i(this,"textExpand",7),this.opened=!1}textExpandHandler(){this.opened=!this.opened}render(){return o(e,null,o("div",{class:"root"},o("div",{class:{text:!0,m_opened:this.opened}},o("slot",null)),o("div",{class:"action"},o("peculiar-button",{onClick:this.textExpand.emit,class:{button_action:!0,m_opened:this.opened},fill:this.opened?"fill":"stroke"},o("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"expand_icon"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))))))}};a.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%}.text{display:inline-block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.text.m_opened{white-space:initial}.action{vertical-align:top;display:inline-block;width:60px;text-align:right;position:relative;top:-6px}.button_action{width:30px}.expand_icon{width:7px;height:5px;display:inline-block}.m_opened .expand_icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}";const l=class{constructor(o){t(this,o),this.type="b3",this.color="dark"}render(){const t=this.type&&this.type.includes("h")?this.type:"p";return o(t,{class:{typography:!0,[`typography_type_${this.type||"b3"}`]:!0,[`typography_color_${this.color||"dark"}`]:!0,[`typography_align_${this.align}`]:!!this.align,typography_ellipsis:this.ellipsis,typography_monospace:this.monospace}},o("slot",null))}};l.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block}.typography{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);font-weight:400;margin:0;padding:0;display:block}.typography_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.typography_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.typography_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.typography_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.typography_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.typography_color_dark{color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.typography_color_light{color:white;color:rgba(var(--pv-color-light-rgb), 1)}.typography_color_grey_3{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.typography_color_grey_5{color:#869196;color:rgba(var(--pv-color-grey_5-rgb), 1)}.typography_color_attention{color:#f7a831;color:rgba(var(--pv-color-attention-rgb), 1)}.typography_color_primary{color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1)}.typography_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.typography_monospace{font-family:monospace}.typography_align_left{text-align:left}.typography_align_center{text-align:center}.typography_align_right{text-align:right}';export{r as peculiar_button,n as peculiar_button_split,s as peculiar_link,a as peculiar_text_hider,l as peculiar_typography}
|
|
@@ -0,0 +1,18 @@
|
|
|
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{O as a,P as r,y as s,W as n,I as d,T as o,V as l,U as h,t as c}from"./p-464e0943.js";import{b as p}from"./p-006865d7.js";import{l as b}from"./p-4f4c1d30.js";import{X as g}from"./p-42da7f97.js";import{g as u,R as m,G as x,a as v,B as f,S as w,T as y,b as k,c as L,d as I,E as S,M as A,e as N,P as j}from"./p-1ebab45c.js";import{C as _}from"./p-6c510523.js";import"./p-d0b55fbb.js";import"./p-d7a13cb4.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 K=(e,i)=>{const{attribute:a}=e;return[t(m,{name:"Name",value:u(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},D=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(m,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},P=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(D,{name:i.value}))},E=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Code Authority",value:""}),t(x,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Code Id",value:""}),t(x,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Short Name",value:i.value.shortName}),t(m,{name:"Short Description",value:i.value.shortDescription}))},C=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Assessment Authority",value:""}),t(x,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Location",value:""}),t(x,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Ref",value:""}),t(x,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(m,{name:"Description",value:i.value.description}))},z=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},T=e=>{const{attribute:i}=e;return t(K,{attribute:i},Object.keys(i.value).map((e=>t(m,{name:e,value:i.value[e].toNumber()?"YES":"NO"}))))},O=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},V=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[O(i.value[e]),t("br",null)]));return t(K,{attribute:i},t(m,{name:"Value",value:a}))},H=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value,monospace:!0}))},$=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.utf8String}))},q=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.toString()}))},R=e=>{const{attributes:i}=e;return i&&i.length?[t(v,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?P:e.value instanceof s?E:e.value instanceof n?C:e.value instanceof d?z:e.value instanceof o?T:e.value instanceof l?V:e.value instanceof h?$:e.value instanceof c?q:"string"==typeof e.value?H:K,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},W=e=>{const{issuer:i}=e;return i?[t(v,{value:b.getString("issuer")}),i.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},B=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(v,{value:b.getString("holder")}),a&&[a.issuer.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(m,{name:b.getString("serialNumber"),value:p.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(m,{name:b.getString("digestInfo"),value:""}),t(m,{name:b.getString("algorithm"),value:u(r.digestAlgorithm.algorithm)}),t(m,{name:b.getString("value"),value:p.Convert.ToHex(r.objectDigest),monospace:!0}),t(m,{name:b.getString("type"),value:r.digestedObjectType})]]},G=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 g)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new g(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 g&&e instanceof g&&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(f,Object.assign({},this.certificateDecoded)),t(W,{issuer:this.certificateDecoded.issuer}),t(B,{holder:this.certificateDecoded.holder}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:this.certificateDecoded.extensions,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{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
|
+
*/G.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 M=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 _)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new _(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 _&&e instanceof _&&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(f,Object.assign({},this.certificateDecoded)),t(N,{name:this.certificateDecoded.subject}),t(j,{publicKey:this.certificateDecoded.publicKey}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};M.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{G as peculiar_attribute_certificate_viewer,M 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)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.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.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-
|
|
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)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.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.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().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-3f8d1008",[[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-e77d0ccc",[[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-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-530afe84",[[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-6011646e",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-38635919",[[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)));
|
|
@@ -5,6 +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 { EventEmitter } from '../../stencil-public-runtime';
|
|
8
9
|
import { X509Certificate, X509AttributeCertificate, CSR } from '../../crypto';
|
|
9
10
|
export declare class CertificateDecoder {
|
|
10
11
|
private inputPaste?;
|
|
@@ -12,9 +13,20 @@ export declare class CertificateDecoder {
|
|
|
12
13
|
* The example certificate value for decode and show details. Use PEM or DER.
|
|
13
14
|
*/
|
|
14
15
|
certificateExample?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The default certificate value for decode and show details. Use PEM or DER.
|
|
18
|
+
*/
|
|
19
|
+
defaultCertificate?: string;
|
|
15
20
|
certificateDecoded: X509Certificate | X509AttributeCertificate | CSR;
|
|
21
|
+
/**
|
|
22
|
+
* Emitted when the certificate has been successfully parsed.
|
|
23
|
+
*/
|
|
24
|
+
successParse: EventEmitter<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Emitted when the certificate has been removed.
|
|
27
|
+
*/
|
|
28
|
+
clearCertificate: EventEmitter<void>;
|
|
16
29
|
componentDidLoad(): void;
|
|
17
|
-
private fetchAndDecodeFile;
|
|
18
30
|
private onClickDecode;
|
|
19
31
|
private onClickExample;
|
|
20
32
|
private onClickClear;
|
|
@@ -69,6 +69,10 @@ export namespace Components {
|
|
|
69
69
|
* The example certificate value for decode and show details. Use PEM or DER.
|
|
70
70
|
*/
|
|
71
71
|
"certificateExample"?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The default certificate value for decode and show details. Use PEM or DER.
|
|
74
|
+
*/
|
|
75
|
+
"defaultCertificate"?: string;
|
|
72
76
|
}
|
|
73
77
|
interface PeculiarCertificateSummary {
|
|
74
78
|
"certificate": X509Certificate;
|
|
@@ -193,6 +197,10 @@ export namespace Components {
|
|
|
193
197
|
"type": 'h4' | 'h6' | 'h7' | 'b1' | 'b3';
|
|
194
198
|
}
|
|
195
199
|
}
|
|
200
|
+
export interface PeculiarCertificateDecoderCustomEvent<T> extends CustomEvent<T> {
|
|
201
|
+
detail: T;
|
|
202
|
+
target: HTMLPeculiarCertificateDecoderElement;
|
|
203
|
+
}
|
|
196
204
|
export interface PeculiarCertificatesViewerCustomEvent<T> extends CustomEvent<T> {
|
|
197
205
|
detail: T;
|
|
198
206
|
target: HTMLPeculiarCertificatesViewerElement;
|
|
@@ -353,6 +361,18 @@ declare namespace LocalJSX {
|
|
|
353
361
|
* The example certificate value for decode and show details. Use PEM or DER.
|
|
354
362
|
*/
|
|
355
363
|
"certificateExample"?: string;
|
|
364
|
+
/**
|
|
365
|
+
* The default certificate value for decode and show details. Use PEM or DER.
|
|
366
|
+
*/
|
|
367
|
+
"defaultCertificate"?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Emitted when the certificate has been removed.
|
|
370
|
+
*/
|
|
371
|
+
"onClearCertificate"?: (event: PeculiarCertificateDecoderCustomEvent<void>) => void;
|
|
372
|
+
/**
|
|
373
|
+
* Emitted when the certificate has been successfully parsed.
|
|
374
|
+
*/
|
|
375
|
+
"onSuccessParse"?: (event: PeculiarCertificateDecoderCustomEvent<string>) => void;
|
|
356
376
|
}
|
|
357
377
|
interface PeculiarCertificateSummary {
|
|
358
378
|
"certificate"?: X509Certificate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peculiar/certificates-viewer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@peculiar/asn1-x509-netscape": "^2.1.9",
|
|
59
59
|
"@peculiar/asn1-x509-qualified": "^2.1.9",
|
|
60
60
|
"dayjs": "^1.11.3",
|
|
61
|
-
"history": "^4.10.1",
|
|
62
61
|
"pvtsutils": "^1.3.2"
|
|
63
62
|
},
|
|
64
63
|
"license": "MIT",
|
|
@@ -71,5 +70,5 @@
|
|
|
71
70
|
"publishConfig": {
|
|
72
71
|
"access": "public"
|
|
73
72
|
},
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "3a5c698a163314940eb7c5093a9fe4246d8a5c1a"
|
|
75
74
|
}
|