-
Notifications
You must be signed in to change notification settings - Fork 3
opendkim.lib_feature()
Christopher Mooney edited this page Oct 27, 2017
·
1 revision
Check if the underlying library supports a specific feature.
For more information:
http://www.opendkim.org/libopendkim/dkim_libfeature.html
Type: String
- The feature to check for.
- A boolean indicating if the specific feature is available.
Features that can be checked:
String passed to function | Description |
---|---|
DKIM_FEATURE_DIFFHEADERS | Underlying code required to provide the dkim_diffheaders() facility. |
DKIM_FEATURE_PARSE_TIME | Underlying code required to provide the dkim_get_msgdate() facility. |
DKIM_FEATURE_QUERY_CACHE | Underlying code required to do local caching of DNS replies (i.e., key records). |
DKIM_FEATURE_SHA256 | Underlying code required to do SHA256 hashing when signing or verifying. |
DKIM_FEATURE_DNSSEC | Underlying code required to conduct DNSSEC evaluation of replies. |
DKIM_FEATURE_OVERSIGN | Capability to "over-sign" header fields to prevent later addition of signed fields. |
-
lib_feature()
is a wrapper aroundlib_feature_obj()
which takes an object.- Calling
lib_feature_obj()
:
- Calling
opendkim.lib_feature_obj({
feature: 'DKIM_FEATURE_DNSSEC'
});
try {
var opendkim = new OpenDKIM();
if (opendkim.lib_feature('DKIM_FEATURE_DIFFHEADERS')) {
console.log('We have diff headers!');
} else {
console.log('Aww, no diff headers. :(');
}
} catch (err) {
console.log(err);
}