Constructor
new DNSoverTLS(opts)
Construct a new DNSoverTLS.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
Options.
|
Classes
Members
Methods
(static) hashCert(cert, hashAlgopt) → {string}
Hash a certificate using the given algorithm.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
cert |
Buffer
|
crypto.X509Certificate
|
The cert to hash. | ||
hashAlg |
string
|
<optional> |
"sha256" | The hash algorithm to use. |
Throws:
-
Unknown certificate type.
- Type
-
Error
Returns:
- Type:
-
string
Hex string.
close() → {Promise.<void>}
Close the socket.
Returns:
- Type:
-
Promise.<void>
Resolved on socket close.
(async) lookup(name, optsopt) → {Promise.<(Buffer|object)>}
Look up a name in the DNS, over TLS.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
DOT_LookupOptions
|
string
|
The DNS name to look up, or opts if this is an object. | ||
opts |
DOT_LookupOptions
|
string
|
<optional> |
{} | Options for the request. If a string is given, it will be used as the rrtype. |
Returns:
- Type:
-
Promise.<(Buffer|object)>
Response.
Events
certificate
Fired on connection when the server sends a certificate.
Properties:
Name | Type | Description |
---|---|---|
cert |
crypto.Certificate
|
A crypto.Certificate from the server. |
host |
string
|
The hostname the client thinks it is connecting to. |
hash |
string
|
The hash computed over the cert. |
connect
Fired right before connection is attempted.
Properties:
Name | Type | Description |
---|---|---|
cert |
object
|
lookup options. |
receive
A buffer of data has been received from the server. Useful for
verbose logging, e.g.