(buf)
| 182 | } |
| 183 | }, |
| 184 | decodeSAN(buf) { |
| 185 | let b = this.decodeExtension(buf, [2, 5, 29, 17]); // Subject Alternative Name |
| 186 | if (!b) return; |
| 187 | |
| 188 | b = new BER((new BER(b)).getSequence()); |
| 189 | |
| 190 | const names = []; |
| 191 | while (b.readable) { |
| 192 | const tag = b.getTag() & 0x7F; |
| 193 | let value = b.getChunk(b.getLength()).slice().buffer; |
| 194 | if ((2 === tag) || (1 === tag) || (6 === tag)) // IA5String: dNSName, rfc822Name, uniformResourceIdentifier |
| 195 | value = String.fromArrayBuffer(value); |
| 196 | names.push({tag, value}); |
| 197 | } |
| 198 | |
| 199 | return names; |
| 200 | }, |
| 201 | decodeExtension(buf, extid) @ "xs_x509_decodeExtension", |
| 202 | }; |
| 203 |
nothing calls this directly
no test coverage detected