MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / decodeAKI

Function decodeAKI

modules/crypt/etc/x509.js:170–183  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

168 return digest.close();
169 },
170 decodeAKI(buf) {
171 let aki = this.decodeExtension(buf, [2, 5, 29, 35]);
172 if (aki) {
173 let ber = new BER(aki);
174 ber.getTag(); // SEQUENCE
175 let len = ber.getLength();
176 let endp = ber.i + len;
177 while (ber.i < endp) {
178 if ((ber.getTag() & 0x1f) == 0)
179 return ber.getChunk(ber.getLength());
180 ber.skip(ber.getLength());
181 }
182 }
183 },
184 decodeSAN(buf) {
185 let b = this.decodeExtension(buf, [2, 5, 29, 17]); // Subject Alternative Name
186 if (!b) return;

Callers

nothing calls this directly

Calls 4

getTagMethod · 0.95
getLengthMethod · 0.95
getChunkMethod · 0.95
skipMethod · 0.95

Tested by

no test coverage detected