#asn1js — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #asn1js, aggregated by home.social.
-
Today I'm retiring old tailor-made big integer code from #asn1js and while I'm happy ES2020 support proper
BigInts, I feel a bit sentimental about it.It's a small silly thing, but I wrote it so many years ago, and it did its small job very well; that is, only parsing arbitrarily long binary integer values and printing them efficiently in decimal, nothing more, nothing less.
/** * Multiply value by m and add c. * @param {number} m - multiplier, must be 0<m<=256 * @param {number} c - value to add, must be c>=0 */ mulAdd(m, c) { let b = this.buf, l = b.length, i, t; for (i = 0; i < l; ++i) { t = b[i] * m + c; if (t < max) c = 0; else { c = 0|(t / max); t -= c * max; } b[i] = t; } if (c > 0) b[i] = c; } -
In new #ASN1js version2.1.0I changed the logic of the shown #ASN1 field names due to research started with GitHub issue #102:
Previously it would have shown simply asissuer, but fixing another issue I had a (kinda) regression and it shown only the CHOICE identifier (in this caserdnSequence).
In the end, I think that probably the best choice is to show both names, the base one as it usually is more useful to identify the field, but the CHOICE name to know which sub-case this is. This leads to a bit of uninteresting info such as thenotBefore utcTime UTCTime, but that's the (small) price to be paid.
This was a delicate change, so first thing I extended the test harness in order to check that a few important examples decode to what is expected. -
In new #ASN1js version2.1.0I changed the logic of the shown #ASN1 field names due to research started with GitHub issue #102:
Previously it would have shown simply asissuer, but fixing another issue I had a (kinda) regression and it shown only the CHOICE identifier (in this caserdnSequence).
In the end, I think that probably the best choice is to show both names, the base one as it usually is more useful to identify the field, but the CHOICE name to know which sub-case this is. This leads to a bit of uninteresting info such as thenotBefore utcTime UTCTime, but that's the (small) price to be paid.
This was a delicate change, so first thing I extended the test harness in order to check that a few important examples decode to what is expected. -
In new #ASN1js version2.1.0I changed the logic of the shown #ASN1 field names due to research started with GitHub issue #102:
Previously it would have shown simply asissuer, but fixing another issue I had a (kinda) regression and it shown only the CHOICE identifier (in this caserdnSequence).
In the end, I think that probably the best choice is to show both names, the base one as it usually is more useful to identify the field, but the CHOICE name to know which sub-case this is. This leads to a bit of uninteresting info such as thenotBefore utcTime UTCTime, but that's the (small) price to be paid.
This was a delicate change, so first thing I extended the test harness in order to check that a few important examples decode to what is expected. -
In new #ASN1js version2.1.0I changed the logic of the shown #ASN1 field names due to research started with GitHub issue #102:
Previously it would have shown simply asissuer, but fixing another issue I had a (kinda) regression and it shown only the CHOICE identifier (in this caserdnSequence).
In the end, I think that probably the best choice is to show both names, the base one as it usually is more useful to identify the field, but the CHOICE name to know which sub-case this is. This leads to a bit of uninteresting info such as thenotBefore utcTime UTCTime, but that's the (small) price to be paid.
This was a delicate change, so first thing I extended the test harness in order to check that a few important examples decode to what is expected. -
Releases a few updates to #asn1js today:
- asn1js 2.0.5 now supports LDA messages ASN.1 schema (RFC4511) and improved
CHOICEmatching - #vscode plugin 0.2.0 published on both OpenVSX and Microsoft marketplace
- asn1js 2.0.5 now supports LDA messages ASN.1 schema (RFC4511) and improved
-
-
-
-
-
-
ASN1js now (also on) ESM
https://f.lapo.it/display/6a1cc041-1766-05fc-9aae-55f015858174
-
@cpu Oh, my #asn1js doesn't support it, what a shame.
(actually uses Peter Gutmann's dumpasn1.cfg file) -
Added PKCS#10 support to ASN1js
https://f.lapo.it/display/6a1cc041-1364-ee66-a032-02f373674423
-
Added PKCS#10 support to ASN1js
https://f.lapo.it/display/6a1cc041-1364-ee66-a032-02f373674423