PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

CertificateComplexExample missing function after rollup #264

Open xbqian opened 4 years ago

xbqian commented 4 years ago

Hi there: Recently, i have tested certificate functions and found out these functions are missing in bundle.js after execute 'npm run ex2':

window.parseCertificate = parseCertificate;
window.createCertificate = createCertificate;
window.verifyCertificate = verifyCertificate;
window.parseCAbundle = parseCAbundle;
window.handleFileBrowse = handleFileBrowse;
window.handleTrustedCertsFile = handleTrustedCertsFile;
window.handleInterCertsFile = handleInterCertsFile;
window.handleCRLsFile = handleCRLsFile;
window.handleCABundle = handleCABundle;
window.handleHashAlgOnChange = handleHashAlgOnChange;
window.handleSignAlgOnChange = handleSignAlgOnChange;

FYI : This issue happened when using rollup version >= 1.24.0. It works fine when rollup version <=1.23.1. Is this bug brought by rollup upgrade or just this example itself?

YuryStrozhevsky commented 4 years ago

@xbqian There were a number of bugs related to rollup in the past. I did not check all in details but I strongly bet it is a bug in rollup. Please try to report it to them - rollup has a very "responsive" team and usually react in few hours/days.

lukastaegert commented 4 years ago

This is not a Rollup bug. See my comment here: https://github.com/rollup/rollup/issues/3448#issuecomment-611776905

YuryStrozhevsky commented 4 years ago

@lukastaegert Thanks for explanations, I will try to find a better way, but for now I moved PKIjs to older Rollup versions.

@xbqian I moved PKIjs to older Rollup packages and published new version 2.1.88