@peculiar/certificates-viewer 3.3.0 → 3.4.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-e1997ebf.js → certification_request-b5fe8a57.js} +129 -151
- package/dist/cjs/{crl-f1ee43bc.js → crl-a1ac7534.js} +11 -2
- package/dist/cjs/l10n-17c96aba.js +169 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +23 -8
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
- package/dist/cjs/{public_key-ba538d77.js → public_key-3d4ae164.js} +2 -2
- package/dist/cjs/{x509_certificate-42b478d2.js → x509_certificate-29a3636a.js} +2 -2
- package/dist/collection/components/crl-viewer/crl-viewer.js +1 -1
- package/dist/collection/components/crl-viewer/revoked_certificates.js +20 -3
- package/dist/collection/crypto/crl.js +9 -0
- package/dist/collection/crypto/utils.js +5 -4
- package/dist/collection/locales/en.json +3 -2
- package/dist/esm/{certification_request-5d982d92.js → certification_request-35ade000.js} +125 -147
- package/dist/esm/{crl-f2110716.js → crl-42d5e233.js} +11 -2
- package/dist/esm/l10n-a68d5748.js +165 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +23 -8
- package/dist/esm/peculiar-certificate-decoder.entry.js +4 -4
- package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/{public_key-0a3091a5.js → public_key-b2dba162.js} +2 -2
- package/dist/esm/{x509_certificate-6b243207.js → x509_certificate-2503dcc1.js} +2 -2
- package/dist/peculiar/locales/en.json +3 -2
- package/dist/peculiar/p-1a8379f0.entry.js +26 -0
- package/dist/peculiar/{p-e535a666.entry.js → p-3d0fdbd5.entry.js} +1 -1
- package/dist/peculiar/{p-f8dc3232.js → p-54171e39.js} +3 -3
- package/dist/peculiar/{p-3aea9dde.js → p-6cd6e6da.js} +5 -5
- package/dist/peculiar/{p-86116b1f.entry.js → p-7a0fb5a8.entry.js} +1 -1
- package/dist/peculiar/{p-49ab6f8c.entry.js → p-870c3592.entry.js} +1 -1
- package/dist/peculiar/{p-bce2bbe0.js → p-a5d07697.js} +7 -7
- package/dist/peculiar/{p-db6e24c6.js → p-b7045733.js} +1 -1
- package/dist/peculiar/{p-34e2d6be.entry.js → p-cb9b9f9c.entry.js} +1 -1
- package/dist/peculiar/p-fec9d812.js +12 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/crl-viewer/revoked_certificates.d.ts +2 -2
- package/dist/types/crypto/crl.d.ts +7 -1
- package/dist/types/utils/l10n.d.ts +2 -1
- package/package.json +19 -19
- package/dist/cjs/l10n-638a7577.js +0 -167
- package/dist/esm/l10n-da0dd100.js +0 -163
- package/dist/peculiar/p-35e7a514.js +0 -12
- package/dist/peculiar/p-ca0c34ca.entry.js +0 -26
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { c as createCommonjsModule, a as commonjsGlobal } from './download-67ac9120.js';
|
|
5
|
+
|
|
6
|
+
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
7
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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 e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-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:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(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 O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.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()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
var relativeTime = createCommonjsModule(function (module, exports) {
|
|
11
|
+
!function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={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 i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.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"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/
|
|
21
|
+
dayjs_min.extend(relativeTime);
|
|
22
|
+
const dateShort = (date) => (new Date(date).toUTCString());
|
|
23
|
+
const dateDiff = (dateStart, dateEnd) => {
|
|
24
|
+
if (!dateStart || !dateEnd) {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
const start = dayjs_min(dateStart);
|
|
28
|
+
const end = dayjs_min(dateEnd);
|
|
29
|
+
return start.to(end, true);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const basicInformation = "Basic Information";
|
|
33
|
+
const subjectName = "Subject Name";
|
|
34
|
+
const issuerName = "Issuer Name";
|
|
35
|
+
const publicKeyInfo = "Public Key Info";
|
|
36
|
+
const signature = "Signature";
|
|
37
|
+
const extensions = "Extensions";
|
|
38
|
+
const miscellaneous = "Miscellaneous";
|
|
39
|
+
const download = "Download";
|
|
40
|
+
const serialNumber = "Serial Number";
|
|
41
|
+
const version = "Version";
|
|
42
|
+
const validity = "Validity";
|
|
43
|
+
const issued = "Issued";
|
|
44
|
+
const expired = "Expired";
|
|
45
|
+
const lastUpdate = "Last Update";
|
|
46
|
+
const nextUpdate = "Next Update";
|
|
47
|
+
const algorithm = "Algorithm";
|
|
48
|
+
const namedCurve = "Named Curve";
|
|
49
|
+
const exponent = "Exponent";
|
|
50
|
+
const modulus = "Modulus";
|
|
51
|
+
const value = "Value";
|
|
52
|
+
const valid = "Valid";
|
|
53
|
+
const revoked = "Revoked";
|
|
54
|
+
const issuer = "Issuer";
|
|
55
|
+
const name = "Name";
|
|
56
|
+
const publicKey = "Public Key";
|
|
57
|
+
const fingerprint = "Fingerprint";
|
|
58
|
+
const fingerprints = "Fingerprints";
|
|
59
|
+
const actions = "Actions";
|
|
60
|
+
const details = "Details";
|
|
61
|
+
const testURLs = "Test URLs";
|
|
62
|
+
const certificateDetails = "Certificate Details";
|
|
63
|
+
const holder = "Holder";
|
|
64
|
+
const digestInfo = "Digest Info";
|
|
65
|
+
const type = "Type";
|
|
66
|
+
const revokedCertificates = "Revoked Certificates";
|
|
67
|
+
const revocationDate = "Revocation Date";
|
|
68
|
+
const yes = "Yes";
|
|
69
|
+
const no = "No";
|
|
70
|
+
const onlyUserCertificates = "Only User Certificates";
|
|
71
|
+
const onlyAttributeCertificates = "Only Attribute Certificates";
|
|
72
|
+
const onlyCACertificates = "Only CA Certificates";
|
|
73
|
+
const indirectCRL = "Indirect CRL";
|
|
74
|
+
const onlyReasons = "Only Reasons";
|
|
75
|
+
const crlEntryExtensions = "CRL Entry Extensions";
|
|
76
|
+
const en = {
|
|
77
|
+
basicInformation: basicInformation,
|
|
78
|
+
subjectName: subjectName,
|
|
79
|
+
issuerName: issuerName,
|
|
80
|
+
publicKeyInfo: publicKeyInfo,
|
|
81
|
+
signature: signature,
|
|
82
|
+
extensions: extensions,
|
|
83
|
+
miscellaneous: miscellaneous,
|
|
84
|
+
download: download,
|
|
85
|
+
"download.pem": "Download PEM",
|
|
86
|
+
"download.der": "Download DER",
|
|
87
|
+
serialNumber: serialNumber,
|
|
88
|
+
version: version,
|
|
89
|
+
validity: validity,
|
|
90
|
+
issued: issued,
|
|
91
|
+
expired: expired,
|
|
92
|
+
lastUpdate: lastUpdate,
|
|
93
|
+
nextUpdate: nextUpdate,
|
|
94
|
+
algorithm: algorithm,
|
|
95
|
+
namedCurve: namedCurve,
|
|
96
|
+
exponent: exponent,
|
|
97
|
+
modulus: modulus,
|
|
98
|
+
value: value,
|
|
99
|
+
valid: valid,
|
|
100
|
+
revoked: revoked,
|
|
101
|
+
issuer: issuer,
|
|
102
|
+
name: name,
|
|
103
|
+
publicKey: publicKey,
|
|
104
|
+
fingerprint: fingerprint,
|
|
105
|
+
fingerprints: fingerprints,
|
|
106
|
+
actions: actions,
|
|
107
|
+
details: details,
|
|
108
|
+
testURLs: testURLs,
|
|
109
|
+
certificateDetails: certificateDetails,
|
|
110
|
+
holder: holder,
|
|
111
|
+
digestInfo: digestInfo,
|
|
112
|
+
type: type,
|
|
113
|
+
revokedCertificates: revokedCertificates,
|
|
114
|
+
revocationDate: revocationDate,
|
|
115
|
+
yes: yes,
|
|
116
|
+
no: no,
|
|
117
|
+
onlyUserCertificates: onlyUserCertificates,
|
|
118
|
+
onlyAttributeCertificates: onlyAttributeCertificates,
|
|
119
|
+
onlyCACertificates: onlyCACertificates,
|
|
120
|
+
indirectCRL: indirectCRL,
|
|
121
|
+
onlyReasons: onlyReasons,
|
|
122
|
+
crlEntryExtensions: crlEntryExtensions
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @license
|
|
127
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the MIT license found in the
|
|
130
|
+
* LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/
|
|
132
|
+
const MESSAGES_ALL = {
|
|
133
|
+
en,
|
|
134
|
+
};
|
|
135
|
+
class Localization {
|
|
136
|
+
constructor() {
|
|
137
|
+
this.setLocale = (locale) => {
|
|
138
|
+
this.locale = locale && MESSAGES_ALL[locale] ? locale : 'en';
|
|
139
|
+
};
|
|
140
|
+
this.getLocale = () => this.locale;
|
|
141
|
+
const language = window.navigator.language.slice(0, 2).toLowerCase();
|
|
142
|
+
this.setLocale(language);
|
|
143
|
+
}
|
|
144
|
+
getString(id, replacer) {
|
|
145
|
+
const value = MESSAGES_ALL[this.locale][id];
|
|
146
|
+
if (!value) {
|
|
147
|
+
return '';
|
|
148
|
+
}
|
|
149
|
+
if (!replacer) {
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
const splitted = value.split(replacer.pattern);
|
|
153
|
+
if (splitted.length > 1) {
|
|
154
|
+
return [
|
|
155
|
+
splitted[0],
|
|
156
|
+
replacer.replacer,
|
|
157
|
+
splitted[1],
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
return value;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const l10n = new Localization();
|
|
164
|
+
|
|
165
|
+
export { dateShort as a, dateDiff as d, l10n as l };
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { Q as OIDs, S as Name, y as ActivityDescription, W as WebGDPR, I as InsuranceValue, T as TypeRelationship, V as ValuationRanking, U as UnstructuredName, t as ChallengePassword } from './certification_request-
|
|
5
|
+
import { Q as OIDs, S as Name, y as ActivityDescription, W as WebGDPR, I as InsuranceValue, T as TypeRelationship, V as ValuationRanking, U as UnstructuredName, t as ChallengePassword, X as CRLReason, Y as InvalidityDate } from './certification_request-35ade000.js';
|
|
6
6
|
import { b as build } from './download-67ac9120.js';
|
|
7
|
-
import { l as l10n, a as dateShort } from './l10n-
|
|
8
|
-
import { X as X509AttributeCertificate, a as CRL, C as CSR } from './crl-
|
|
9
|
-
import { g as getStringByOID, R as RowValue, G as GeneralNamePart, a as RowTitle, B as BasicInformation, S as Signature, T as Thumbprints, b as getLEILink, c as getDNSNameLink, d as getIPAddressLink, E as Extensions, M as Miscellaneous, I as IssuerName, e as SubjectName, P as PublicKey } from './public_key-
|
|
7
|
+
import { l as l10n, a as dateShort } from './l10n-a68d5748.js';
|
|
8
|
+
import { X as X509AttributeCertificate, a as CRL, C as CSR } from './crl-42d5e233.js';
|
|
9
|
+
import { g as getStringByOID, R as RowValue, G as GeneralNamePart, a as RowTitle, B as BasicInformation, S as Signature, T as Thumbprints, b as getLEILink, c as getDNSNameLink, d as getIPAddressLink, E as Extensions, M as Miscellaneous, I as IssuerName, e as SubjectName, P as PublicKey } from './public_key-b2dba162.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -386,12 +386,27 @@ AttributeCertificateViewer.style = certificateViewerCss$2;
|
|
|
386
386
|
* LICENSE file in the root directory of this source tree.
|
|
387
387
|
*/
|
|
388
388
|
const RevokedCertificates = (props) => {
|
|
389
|
-
const {
|
|
389
|
+
const { revokedCertificates, } = props;
|
|
390
|
+
if (!revokedCertificates || !revokedCertificates.length) {
|
|
391
|
+
return null;
|
|
392
|
+
}
|
|
390
393
|
return [
|
|
391
394
|
h(RowTitle, { value: l10n.getString('revokedCertificates') }),
|
|
392
|
-
|
|
395
|
+
revokedCertificates.map((certificate) => ([
|
|
393
396
|
h(RowValue, { name: l10n.getString('serialNumber'), value: build.Convert.ToHex(certificate.userCertificate), monospace: true }),
|
|
394
|
-
h(RowValue, { name: l10n.getString('
|
|
397
|
+
h(RowValue, { name: l10n.getString('revocationDate'), value: dateShort(certificate.revocationDate.getTime()) }),
|
|
398
|
+
(certificate.crlEntryExtensions && certificate.crlEntryExtensions.length && ([
|
|
399
|
+
h(RowValue, { name: `${l10n.getString('crlEntryExtensions')}:`, value: "" }),
|
|
400
|
+
certificate.crlEntryExtensions.map((extension) => {
|
|
401
|
+
if (extension.value instanceof CRLReason) {
|
|
402
|
+
return (h(RowValue, { name: getStringByOID(extension.asn.extnID), value: extension.value.toJSON() || extension.value.reason }));
|
|
403
|
+
}
|
|
404
|
+
if (extension.value instanceof InvalidityDate) {
|
|
405
|
+
return (h(RowValue, { name: getStringByOID(extension.asn.extnID), value: extension.value.value.getTime() }));
|
|
406
|
+
}
|
|
407
|
+
return (h(RowValue, { name: getStringByOID(extension.asn.extnID), value: build.Convert.ToHex(extension.asn.extnValue), monospace: true }));
|
|
408
|
+
}),
|
|
409
|
+
])),
|
|
395
410
|
h("tr", null,
|
|
396
411
|
h("td", { colSpan: 2, class: "divider" },
|
|
397
412
|
h("span", { class: "bg_fill" }))),
|
|
@@ -474,7 +489,7 @@ const CrlViewer = class {
|
|
|
474
489
|
if (!this.certificateDecoded) {
|
|
475
490
|
return this.renderEmptyState();
|
|
476
491
|
}
|
|
477
|
-
return (h(Host, { "data-view": this.view }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink }),
|
|
492
|
+
return (h(Host, { "data-view": this.view }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink }), h(RevokedCertificates, { revokedCertificates: this.certificateDecoded.revokedCertificates }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
|
|
478
493
|
}
|
|
479
494
|
static get watchers() { return {
|
|
480
495
|
"certificate": ["watchCertificateAndDecode"]
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { i as isPem, a as isX509Pem, b as isPkcs10Pem, c as isX509AttributePem, d as isX509CRLPem } from './certification_request-
|
|
6
|
-
import './l10n-
|
|
5
|
+
import { i as isPem, a as isX509Pem, b as isPkcs10Pem, c as isX509AttributePem, d as isX509CRLPem } from './certification_request-35ade000.js';
|
|
6
|
+
import './l10n-a68d5748.js';
|
|
7
7
|
import './download-67ac9120.js';
|
|
8
|
-
import { X as X509Certificate } from './x509_certificate-
|
|
9
|
-
import { X as X509AttributeCertificate, C as CSR, a as CRL } from './crl-
|
|
8
|
+
import { X as X509Certificate } from './x509_certificate-2503dcc1.js';
|
|
9
|
+
import { X as X509AttributeCertificate, C as CSR, a as CRL } from './crl-42d5e233.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @license
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-bbd484d9.js';
|
|
5
|
-
import { l as l10n, a as dateShort } from './l10n-
|
|
5
|
+
import { l as l10n, a as dateShort } from './l10n-a68d5748.js';
|
|
6
6
|
import './download-67ac9120.js';
|
|
7
7
|
|
|
8
8
|
const certificateSummaryCss = ":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%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, h, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { X as X509Certificate } from './x509_certificate-
|
|
6
|
-
import './certification_request-
|
|
5
|
+
import { X as X509Certificate } from './x509_certificate-2503dcc1.js';
|
|
6
|
+
import './certification_request-35ade000.js';
|
|
7
7
|
import './download-67ac9120.js';
|
|
8
|
-
import './l10n-
|
|
9
|
-
import { B as BasicInformation, e as SubjectName, I as IssuerName, P as PublicKey, S as Signature, T as Thumbprints, E as Extensions, b as getLEILink, c as getDNSNameLink, d as getIPAddressLink, M as Miscellaneous } from './public_key-
|
|
8
|
+
import './l10n-a68d5748.js';
|
|
9
|
+
import { B as BasicInformation, e as SubjectName, I as IssuerName, P as PublicKey, S as Signature, T as Thumbprints, E as Extensions, b as getLEILink, c as getDNSNameLink, d as getIPAddressLink, M as Miscellaneous } from './public_key-b2dba162.js';
|
|
10
10
|
|
|
11
11
|
const certificateViewerCss = ":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}";
|
|
12
12
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { X as X509Certificate } from './x509_certificate-
|
|
6
|
-
import { Q as OIDs } from './certification_request-
|
|
5
|
+
import { X as X509Certificate } from './x509_certificate-2503dcc1.js';
|
|
6
|
+
import { Q as OIDs } from './certification_request-35ade000.js';
|
|
7
7
|
import './download-67ac9120.js';
|
|
8
|
-
import { l as l10n } from './l10n-
|
|
8
|
+
import { l as l10n } from './l10n-a68d5748.js';
|
|
9
9
|
|
|
10
10
|
const certificatesViewerCss = ":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;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
|
|
11
11
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from './index-bbd484d9.js';
|
|
5
5
|
import { b as build } from './download-67ac9120.js';
|
|
6
|
-
import { l as l10n, a as dateShort } from './l10n-
|
|
7
|
-
import { Q as OIDs, S as Name,
|
|
6
|
+
import { l as l10n, a as dateShort } from './l10n-a68d5748.js';
|
|
7
|
+
import { Q as OIDs, S as Name, Z as OtherName, p as AsnParser, _ as DisplayText, $ as UserNotice, a0 as EDIPartyName, a1 as AsnIntegerArrayBufferConverter, a2 as KeyUsage, a3 as BasicConstraints, a4 as ExtendedKeyUsage, a5 as SubjectKeyIdentifier, a6 as AuthorityKeyIdentifier, a7 as CRLDistributionPoints, a8 as AuthorityInfoAccessSyntax, a9 as SubjectInfoAccessSyntax, aa as SubjectAlternativeName, ab as CertificatePolicies, ac as CertificateTransparency, ad as NameConstraints, ae as CertificateTemplate, af as EnrollCertTypeChoice, ag as CaVersion, ah as QCStatements, ai as NetscapeComment, aj as NetscapeCertType, ak as LeiRole, al as LeiChoice, am as Timestamp, an as ArchiveRevInfo, X as CRLReason, ao as SubjectDirectoryAttributes, ap as PrivateKeyUsagePeriod, aq as EntrustVersionInfo, ar as BiometricSyntax, as as LogotypeExtn, at as TNAuthorizationList, au as PolicyConstraints, av as PolicyMappings, aw as CRLNumber, ax as IssuingDistributionPoint } from './certification_request-35ade000.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { A as AsnData, e as certificateRawToBuffer, C as Certificate, N as Name, E as Extension, f as AsnConvert, g as id_ecPublicKey, h as ECParameters, j as id_rsaEncryption, R as RSAPublicKey, k as hexFormat, l as base64Format, m as getCertificateThumbprint } from './certification_request-
|
|
4
|
+
import { A as AsnData, e as certificateRawToBuffer, C as Certificate, N as Name, E as Extension, f as AsnConvert, g as id_ecPublicKey, h as ECParameters, j as id_rsaEncryption, R as RSAPublicKey, k as hexFormat, l as base64Format, m as getCertificateThumbprint } from './certification_request-35ade000.js';
|
|
5
5
|
import { b as build, D as Download } from './download-67ac9120.js';
|
|
6
|
-
import { d as dateDiff } from './l10n-
|
|
6
|
+
import { d as dateDiff } from './l10n-a68d5748.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
"digestInfo": "Digest Info",
|
|
37
37
|
"type": "Type",
|
|
38
38
|
"revokedCertificates": "Revoked Certificates",
|
|
39
|
-
"
|
|
39
|
+
"revocationDate": "Revocation Date",
|
|
40
40
|
"yes": "Yes",
|
|
41
41
|
"no": "No",
|
|
42
42
|
"onlyUserCertificates": "Only User Certificates",
|
|
43
43
|
"onlyAttributeCertificates": "Only Attribute Certificates",
|
|
44
44
|
"onlyCACertificates": "Only CA Certificates",
|
|
45
45
|
"indirectCRL": "Indirect CRL",
|
|
46
|
-
"onlyReasons": "Only Reasons"
|
|
46
|
+
"onlyReasons": "Only Reasons",
|
|
47
|
+
"crlEntryExtensions": "CRL Entry Extensions"
|
|
47
48
|
}
|
|
@@ -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 n,I as d,T as o,V as l,U as h,t as c,X as p,Y as b}from"./p-a5d07697.js";import{b as g}from"./p-cff9655c.js";import{l as u,a as m}from"./p-fec9d812.js";import{X as x,a as v,C as f}from"./p-6cd6e6da.js";import{g as w,R as y,G as k,a as L,B as I,S,T as _,b as A,c as N,d as j,E as K,M as D,I as C,e as E,P}from"./p-54171e39.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 z=(e,i)=>{const{attribute:a}=e;return[t(y,{name:"Name",value:w(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},T=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(y,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},H=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(T,{name:i.value}))},V=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Code Authority",value:""}),t(k,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Code Id",value:""}),t(k,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Short Name",value:i.value.shortName}),t(y,{name:"Short Description",value:i.value.shortDescription}))},$=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Assessment Authority",value:""}),t(k,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Assessment Location",value:""}),t(k,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Assessment Ref",value:""}),t(k,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(y,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(y,{name:"Description",value:i.value.description}))},O=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},q=e=>{const{attribute:i}=e;return t(z,{attribute:i},Object.keys(i.value).map((e=>t(y,{name:e,value:i.value[e].toNumber()?u.getString("yes"):u.getString("no")}))))},R=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},W=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[R(i.value[e]),t("br",null)]));return t(z,{attribute:i},t(y,{name:"Value",value:a}))},X=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value,monospace:!0}))},B=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value.utf8String}))},G=e=>{const{attribute:i}=e;return t(z,{attribute:i},t(y,{name:"Value",value:i.value.toString()}))},M=e=>{const{attributes:i}=e;return i&&i.length?[t(L,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?H:e.value instanceof s?V:e.value instanceof n?$:e.value instanceof d?O:e.value instanceof o?q:e.value instanceof l?W:e.value instanceof h?B:e.value instanceof c?G:"string"==typeof e.value?X:z,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},Q=e=>{const{issuer:i}=e;return i?[t(L,{value:u.getString("issuer")}),i.map((e=>t(k,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},U=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(L,{value:u.getString("holder")}),a&&[a.issuer.map((e=>t(k,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(y,{name:u.getString("serialNumber"),value:g.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(y,{name:u.getString("digestInfo"),value:""}),t(y,{name:u.getString("algorithm"),value:w(r.digestAlgorithm.algorithm)}),t(y,{name:u.getString("value"),value:g.Convert.ToHex(r.objectDigest),monospace:!0}),t(y,{name:u.getString("type"),value:r.digestedObjectType})]]},Y=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 x)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new x(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 x&&e instanceof x&&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(I,Object.assign({},this.certificateDecoded)),t(Q,{issuer:this.certificateDecoded.issuer}),t(U,{holder:this.certificateDecoded.holder}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(M,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(K,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(D,{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
|
+
*/Y.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 F=e=>{const{revokedCertificates:i}=e;return i&&i.length?[t(L,{value:u.getString("revokedCertificates")}),i.map((e=>[t(y,{name:u.getString("serialNumber"),value:g.Convert.ToHex(e.userCertificate),monospace:!0}),t(y,{name:u.getString("revocationDate"),value:m(e.revocationDate.getTime())}),e.crlEntryExtensions&&e.crlEntryExtensions.length&&[t(y,{name:`${u.getString("crlEntryExtensions")}:`,value:""}),e.crlEntryExtensions.map((e=>t(y,e.value instanceof p?{name:w(e.asn.extnID),value:e.value.toJSON()||e.value.reason}:e.value instanceof b?{name:w(e.asn.extnID),value:e.value.value.getTime()}:{name:w(e.asn.extnID),value:g.Convert.ToHex(e.asn.extnValue),monospace:!0})))],t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]))]:null},J=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 v)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new v(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 v&&e instanceof v&&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(I,Object.assign({},this.certificateDecoded)),t(C,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(K,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),t(F,{revokedCertificates:this.certificateDecoded.revokedCertificates}),this.download&&t(D,{certificate:this.certificateDecoded}))):this.renderEmptyState()}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}";const Z=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 f)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new f(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 f&&e instanceof f&&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(I,Object.assign({},this.certificateDecoded)),t(E,{name:this.certificateDecoded.subject}),t(P,{publicKey:this.certificateDecoded.publicKey}),t(S,{signature:this.certificateDecoded.signature}),t(_,{thumbprints:this.certificateDecoded.thumbprints}),t(M,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(K,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:A,getDNSNameLink:N,getIPAddressLink:j,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(D,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};Z.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{Y as peculiar_attribute_certificate_viewer,J as peculiar_crl_viewer,Z as peculiar_csr_viewer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-
|
|
4
|
+
import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-b7045733.js";import"./p-a5d07697.js";import"./p-cff9655c.js";import"./p-fec9d812.js";import{B as r,e as d,I as s,P as o,S as n,T as l,E as p,b as h,c,d as b,M as g}from"./p-54171e39.js";const x=class{constructor(i){t(this,i),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 i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?i(e,{"data-view":this.view},i("table",null,i(r,Object.assign({},this.certificateDecoded)),i(d,{name:this.certificateDecoded.subject}),i(s,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),i(o,{publicKey:this.certificateDecoded.publicKey}),i(n,{signature:this.certificateDecoded.signature}),i(l,{thumbprints:this.certificateDecoded.thumbprints}),i(p,{extensions:this.certificateDecoded.extensions,getLEILink:h,getDNSNameLink:c,getIPAddressLink:b,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&i(g,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};x.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{x as peculiar_certificate_viewer}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-cff9655c.js";import{l as n,a as c}from"./p-
|
|
4
|
+
import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-cff9655c.js";import{l as n,a as c}from"./p-fec9d812.js";import{Q as t,S as o,Z as s,p as f,_ as i,$ as d,a0 as b,a1 as r,a2 as l,a3 as u,a4 as m,a5 as v,a6 as x,a7 as g,a8 as p,a9 as y,aa as C,ab as h,ac as N,ad as S,ae as A,af as D,ag as I,ah as G,ai as j,aj as T,ak as O,al as k,am as $,an as P,X as L,ao as V,ap as R,aq as U,ar as E,as as K,at as H,au as X,av as M,aw as Y,ax as _}from"./p-a5d07697.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -38,7 +38,7 @@ function Ne(e){return a.Convert.ToString(e.values[0])}
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Attribute #${n+1}`,value:""}),e(w,{name:"Type",value:q(a.type)}),e(w,{name:"Value",value:Ne(a)})])))},Ae=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},De=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Not Before",value:c(n.value.notBefore)}),e(w,{name:"Not After",value:c(n.value.notAfter)}))},Ie=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.entrustVers}),e(w,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},Ge=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Biometric #${c+1}`,value:""}),e(w,{name:"OID",value:q(n.typeOfBiometricData.biometricDataOid)}),e(w,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(w,{name:"Algorithm",value:q(n.hashAlgorithm.algorithm)}),e(w,{name:"Hash",value:a.Convert.ToHex(n.biometricDataHash.buffer),monospace:!0}),e(w,{name:"Source Uri",value:n.sourceDataUri})])))},je=n=>{const{extension:c}=n,t=n=>n?n.map((n=>{const{imageDetails:c}=n;return[e(w,{name:"Image Type",value:c.mediaType}),e(w,{name:"Image Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Image URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Image Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,o=n=>n?n.map((n=>{const{audioDetails:c}=n;return[e(w,{name:"Audio Type",value:c.mediaType}),e(w,{name:"Audio Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Audio URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Audio Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,s=(a,n)=>{if(!n||!n.direct)return null;const{image:c,audio:s}=n.direct;return[e(w,{name:"Type",value:a}),t(c),o(s),e("tr",null,e("td",null),e("td",null))]};return e(Z,{extension:c},s("Subject",c.value.subjectLogo),s("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Entry #${n+1}`,value:""}),e(w,{name:"SPC",value:a.spc}),e(w,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(w,{name:"One",value:a.one})])))},Oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.requireExplicitPolicy&&e(w,{name:"Require Explicit Policy",value:r.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(w,{name:"Inhibit Policy Mapping",value:r.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},ke=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"Issuer Domain",value:q(a.issuerDomainPolicy)}),e(w,{name:"Subject Domain",value:q(a.subjectDomainPolicy)})])))},$e=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:n.getString("value"),value:c.value.value}))},Pe=a=>{var c;const{extension:t}=a;return e(Z,{extension:t},null===(c=t.value.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),t.value.onlySomeReasons&&e(w,{name:n.getString("onlyReasons"),value:t.value.onlySomeReasons.toJSON().join(", ")}),t.value.indirectCRL&&e(w,{name:n.getString("indirectCRL"),value:n.getString("yes")}),t.value.onlyContainsUserCerts&&e(w,{name:n.getString("onlyUserCertificates"),value:n.getString("yes")}),t.value.onlyContainsAttributeCerts&&e(w,{name:n.getString("onlyAttributeCertificates"),value:n.getString("yes")}),t.value.onlyContainsCACerts&&e(w,{name:n.getString("onlyCACertificates"),value:n.getString("yes")}))},Le=a=>{const{extensions:n,title:c}=a;return n&&n.length?[e(B,{value:c||"Extensions"}),n.map((n=>{try{return n.value instanceof l?e(J,{extension:n}):n.value instanceof u?e(ee,{extension:n}):n.value instanceof m?e(ae,{extension:n}):n.value instanceof v?e(ne,Object.assign({extension:n},a)):n.value instanceof x?e(ce,Object.assign({extension:n},a)):n.value instanceof g?e(te,Object.assign({extension:n},a)):n.value instanceof p||n.value instanceof y?e(oe,Object.assign({extension:n},a)):n.value instanceof C?e(se,Object.assign({extension:n},a)):n.value instanceof h?e(fe,{extension:n}):n.value instanceof N?e(de,{extension:n}):n.value instanceof S?e(be,Object.assign({extension:n},a)):n.value instanceof A?e(re,{extension:n}):n.value instanceof D?e(le,{extension:n}):n.value instanceof I?e(ue,{extension:n}):n.value instanceof G?e(me,{extension:n}):n.value instanceof j?e(ve,{extension:n}):n.value instanceof T?e(xe,{extension:n}):n.value instanceof O?e(ge,{extension:n}):n.value instanceof k?e(pe,Object.assign({extension:n},a)):n.value instanceof $?e(ye,Object.assign({extension:n},a)):n.value instanceof P?e(Ce,{extension:n}):n.value instanceof L?e(he,{extension:n}):n.value instanceof V?e(Se,{extension:n}):n.value instanceof R?e(De,{extension:n}):n.value instanceof U?e(Ie,{extension:n}):n.value instanceof E?e(Ge,{extension:n}):n.value instanceof K?e(je,{extension:n}):n.value instanceof H?e(Te,{extension:n}):n.value instanceof X?e(Oe,{extension:n}):n.value instanceof
|
|
41
|
+
*/const Se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Attribute #${n+1}`,value:""}),e(w,{name:"Type",value:q(a.type)}),e(w,{name:"Value",value:Ne(a)})])))},Ae=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},De=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Not Before",value:c(n.value.notBefore)}),e(w,{name:"Not After",value:c(n.value.notAfter)}))},Ie=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.entrustVers}),e(w,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},Ge=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Biometric #${c+1}`,value:""}),e(w,{name:"OID",value:q(n.typeOfBiometricData.biometricDataOid)}),e(w,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(w,{name:"Algorithm",value:q(n.hashAlgorithm.algorithm)}),e(w,{name:"Hash",value:a.Convert.ToHex(n.biometricDataHash.buffer),monospace:!0}),e(w,{name:"Source Uri",value:n.sourceDataUri})])))},je=n=>{const{extension:c}=n,t=n=>n?n.map((n=>{const{imageDetails:c}=n;return[e(w,{name:"Image Type",value:c.mediaType}),e(w,{name:"Image Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Image URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Image Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,o=n=>n?n.map((n=>{const{audioDetails:c}=n;return[e(w,{name:"Audio Type",value:c.mediaType}),e(w,{name:"Audio Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Audio URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Audio Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,s=(a,n)=>{if(!n||!n.direct)return null;const{image:c,audio:s}=n.direct;return[e(w,{name:"Type",value:a}),t(c),o(s),e("tr",null,e("td",null),e("td",null))]};return e(Z,{extension:c},s("Subject",c.value.subjectLogo),s("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Entry #${n+1}`,value:""}),e(w,{name:"SPC",value:a.spc}),e(w,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(w,{name:"One",value:a.one})])))},Oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.requireExplicitPolicy&&e(w,{name:"Require Explicit Policy",value:r.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(w,{name:"Inhibit Policy Mapping",value:r.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},ke=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"Issuer Domain",value:q(a.issuerDomainPolicy)}),e(w,{name:"Subject Domain",value:q(a.subjectDomainPolicy)})])))},$e=a=>{const{extension:c}=a;return e(Z,{extension:c},e(w,{name:n.getString("value"),value:c.value.value}))},Pe=a=>{var c;const{extension:t}=a;return e(Z,{extension:t},null===(c=t.value.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),t.value.onlySomeReasons&&e(w,{name:n.getString("onlyReasons"),value:t.value.onlySomeReasons.toJSON().join(", ")}),t.value.indirectCRL&&e(w,{name:n.getString("indirectCRL"),value:n.getString("yes")}),t.value.onlyContainsUserCerts&&e(w,{name:n.getString("onlyUserCertificates"),value:n.getString("yes")}),t.value.onlyContainsAttributeCerts&&e(w,{name:n.getString("onlyAttributeCertificates"),value:n.getString("yes")}),t.value.onlyContainsCACerts&&e(w,{name:n.getString("onlyCACertificates"),value:n.getString("yes")}))},Le=a=>{const{extensions:n,title:c}=a;return n&&n.length?[e(B,{value:c||"Extensions"}),n.map((n=>{try{return n.value instanceof l?e(J,{extension:n}):n.value instanceof u?e(ee,{extension:n}):n.value instanceof m?e(ae,{extension:n}):n.value instanceof v?e(ne,Object.assign({extension:n},a)):n.value instanceof x?e(ce,Object.assign({extension:n},a)):n.value instanceof g?e(te,Object.assign({extension:n},a)):n.value instanceof p||n.value instanceof y?e(oe,Object.assign({extension:n},a)):n.value instanceof C?e(se,Object.assign({extension:n},a)):n.value instanceof h?e(fe,{extension:n}):n.value instanceof N?e(de,{extension:n}):n.value instanceof S?e(be,Object.assign({extension:n},a)):n.value instanceof A?e(re,{extension:n}):n.value instanceof D?e(le,{extension:n}):n.value instanceof I?e(ue,{extension:n}):n.value instanceof G?e(me,{extension:n}):n.value instanceof j?e(ve,{extension:n}):n.value instanceof T?e(xe,{extension:n}):n.value instanceof O?e(ge,{extension:n}):n.value instanceof k?e(pe,Object.assign({extension:n},a)):n.value instanceof $?e(ye,Object.assign({extension:n},a)):n.value instanceof P?e(Ce,{extension:n}):n.value instanceof L?e(he,{extension:n}):n.value instanceof V?e(Se,{extension:n}):n.value instanceof R?e(De,{extension:n}):n.value instanceof U?e(Ie,{extension:n}):n.value instanceof E?e(Ge,{extension:n}):n.value instanceof K?e(je,{extension:n}):n.value instanceof H?e(Te,{extension:n}):n.value instanceof X?e(Oe,{extension:n}):n.value instanceof M?e(ke,{extension:n}):n.value instanceof Y?e($e,{extension:n}):n.value instanceof _?e(Pe,Object.assign({extension:n},a)):e("string"==typeof n.value?Ae:Z,{extension:n})}catch(e){return console.error("Error render extension:",n.asn.extnID),null}}))]:null},Ve=a=>{const{serialNumber:t,version:o,validity:s,notBefore:f,notAfter:i,lastUpdate:d,nextUpdate:b,type:r}=a;return[e(B,{value:n.getString("basicInformation")}),e(w,{name:n.getString("type"),value:r}),e(w,{name:n.getString("serialNumber"),value:t,monospace:!0}),e(w,{name:n.getString("version"),value:o}),e(w,{name:n.getString("validity"),value:s}),e(w,{name:n.getString("issued"),value:f?c(f):void 0}),e(w,{name:n.getString("expired"),value:i?c(i):void 0}),e(w,{name:n.getString("lastUpdate"),value:d?c(d):void 0}),e(w,{name:n.getString("nextUpdate"),value:b?c(b):void 0})]},Re=a=>{const{certificate:c}=a;return[e(B,{value:n.getString("miscellaneous")}),e("tr",null,e("td",{class:"vertical_align_middle"},e("peculiar-typography",{color:"grey_5"},n.getString("download"),":")),e("td",null,e("peculiar-button-split",{onClick:()=>c.downloadAsPEM(),actions:[{text:n.getString("download.der"),onClick:()=>c.downloadAsDER()}]},n.getString("download.pem"))))]},Ue=e=>`https://search.gleif.org/#/record/${e}`,Ee=e=>`https://search.censys.io/search?resource=hosts&q=dns.names%3A${e}`,Ke=e=>`https://search.censys.io/search?resource=hosts&q=ip%3A${e}`
|
|
42
42
|
/**
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -60,4 +60,4 @@ function Ne(e){return a.Convert.ToString(e.values[0])}
|
|
|
60
60
|
* This source code is licensed under the MIT license found in the
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
function
|
|
63
|
+
function Me(e){var a;if(null===(a=e.params)||void 0===a?void 0:a.modulus){let a=e.params.modulus.byteLength;return a%2&&(a-=1),8*a}return null}function Ye(e){var a;return(null===(a=e.params)||void 0===a?void 0:a.publicExponent)?3===e.params.publicExponent.byteLength?65537:3:null}const _e=c=>{var t;const{publicKey:o}=c;return o?[e(B,{value:n.getString("publicKeyInfo")}),e(w,{name:n.getString("algorithm"),value:q(o.algorithm)}),e(w,{name:n.getString("namedCurve"),value:q(null===(t=o.params)||void 0===t?void 0:t.namedCurve)}),e(w,{name:n.getString("exponent"),value:Ye(o)}),e(w,{name:n.getString("modulus"),value:Me(o)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(o.value),monospace:!0,collapse:!0})]:null};export{Ve as B,Le as E,F as G,He as I,Re as M,_e as P,w as R,W as S,Q as T,B as a,Ue as b,Ee as c,Ke as d,Xe as e,q as g}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{A as t,n as s,o as e,p as
|
|
4
|
+
import{A as t,n as s,o as e,p as r,q as i,E as a,f as n,r as o,U as h,s as c,t as u,u as l,V as m,v as E,I as g,w as p,W as A,x as d,y as f,z as b,T as w,B as x,D as C,F as T,G as R,H as I,J as v,K as k,L as N,e as F,M as y,m as B,k as D,l as P,O as H,N as L,g as S,h as j,j as U,R as X,P as q}from"./p-a5d07697.js";import{b as G,D as K}from"./p-cff9655c.js";import{d as M}from"./p-fec9d812.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case
|
|
11
|
+
*/class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case k:this.value=r.parse(F,N);break;case I:this.value=r.parse(F,v);break;case T:this.value=r.parse(F,R);break;case x:this.value=r.parse(F,C);break;case b:this.value=r.parse(F,w);break;case d:this.value=r.parse(F,f);break;case p:this.value=r.parse(F,A);break;case E:this.value=r.parse(F,g);break;case l:this.value=r.parse(F,m);break;case c:this.value=r.parse(F,u);break;case o:this.value=r.parse(F,h);break;case e:{const t=r.parse(F,i);this.value=t.map((t=>new a(n.serialize(t))));break}default:this.value=G.Convert.ToHex(F)}}getAsnExtnValue(){return this.asn.values[0]}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/class O extends t{constructor(t){var s;super(F(t),
|
|
18
|
+
*/class O extends t{constructor(t){var s;super(F(t),y),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:e}=this.asn;this.serialNumber=G.Convert.ToHex(e.serialNumber),this.version=e.version;const r=e.attrCertValidityPeriod.notBeforeTime;if(!r)throw new Error("Cannot get 'notBefore' value");this.notBefore=r;const i=e.attrCertValidityPeriod.notAfterTime;if(!i)throw new Error("Cannot get 'notAfter' value");this.notAfter=i,this.validity=M(this.notBefore,this.notAfter),this.issuer=e.issuer.v1Form||(null===(s=e.issuer.v2Form)||void 0===s?void 0:s.issuerName),this.holder=e.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new a(n.serialize(t)))))}parseAttributes(){const{acinfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${P(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){K.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/class V extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new L(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===S&&s.parameters&&(e=n.parse(s.parameters,j)),s.algorithm===U&&(e=n.parse(t,X)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await
|
|
25
|
+
*/class V extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new L(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===S&&s.parameters&&(e=n.parse(s.parameters,j)),s.algorithm===U&&(e=n.parse(t,X)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${P(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){K.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/class Q extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new L(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime()}async getThumbprint(t="SHA-1"){try{const s=await
|
|
32
|
+
*/class Q extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new L(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime(),this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:null===(s=t.crlEntryExtensions)||void 0===s?void 0:s.map((t=>new a(n.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}parseExtensions(){const{tbsCertList:t}=this.asn;t.crlExtensions&&(this.extensions=t.crlExtensions.map((t=>new a(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${P(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){K.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{V as C,O as X,Q as a}
|