-
Notifications
You must be signed in to change notification settings - Fork 3
opendkim.sig_getidentity()
Christopher Mooney edited this page May 8, 2017
·
5 revisions
This call retrieves the signing identity from the signature ultimately used to verify a message. This must be called after either opendkim.chunk_end()
or opendkim.eom()
. This function uses the signature handle found by opendkim.get_signature()
to pull the identity from. Internally, this function calls opendkim.get_signature()
, so there is no need to explicitly call it yourself.
Type: undefined
- throws an error if
- The function was called before
opendkim.chunk_end()
oropendkim.eom()
and thusopendkim.verify()
- The message represented was not signed.
- The function was called before
- returns the identity string on success.
- throws an error if there is simply no signature on the message.
try {
var opendkim = new OpenDKIM();
opendkim.verify({id: undefined});
opendkim.chunk({
message: message,
length: message.length
});
opendkim.chunk_end();
opendkim.sig_getidentity();
} catch (err) {
console.log(err);
}