diff options
author | Maximilian Krambach <[email protected]> | 2018-07-27 18:56:11 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-07-27 18:56:11 +0000 |
commit | 522121ea7e105acc22795b1997ca500c7b227b4f (patch) | |
tree | 6abcd2aaceb3460b366d3c3e57491186a9e5fe94 /lang/js/src/Signature.js | |
parent | js: change the write access for js class methods (diff) | |
download | gpgme-522121ea7e105acc22795b1997ca500c7b227b4f.tar.gz gpgme-522121ea7e105acc22795b1997ca500c7b227b4f.zip |
js: fix indentaion
--
* doing the indentation changes that became neccesary in the last
commit.
Diffstat (limited to '')
-rw-r--r-- | lang/js/src/Signature.js | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/lang/js/src/Signature.js b/lang/js/src/Signature.js index ff4278ad..0ee58e94 100644 --- a/lang/js/src/Signature.js +++ b/lang/js/src/Signature.js @@ -84,65 +84,65 @@ class GPGME_Signature { constructor(sigObject){ let _rawSigObject = sigObject; - this.getFingerprint = function(){ - if (!_rawSigObject.fingerprint){ - return gpgme_error('SIG_WRONG'); - } else { - return _rawSigObject.fingerprint; - } - }; - - /** - * The expiration of this Signature as Javascript date, or null if - * signature does not expire - * @returns {Date | null} - */ - this.getExpiration = function(){ - if (!_rawSigObject.exp_timestamp){ - return null; - } - return new Date(_rawSigObject.exp_timestamp* 1000); - }; - - /** - * The creation date of this Signature in Javascript Date - * @returns {Date} - */ - this.getTimestamp= function (){ - return new Date(_rawSigObject.timestamp * 1000); - }; - - /** - * The overall validity of the key. If false, errorDetails may contain - * additional information - */ - this.getValid= function() { - if (_rawSigObject.summary.valid === true){ - return true; - } else { - return false; - } - }; - - /** - * gives more information on non-valid signatures. Refer to the gpgme docs - * https://www.gnupg.org/documentation/manuals/gpgme/Verify.html for - * details on the values - * @returns {Object} Object with boolean properties - */ - this.getErrorDetails = function (){ - let properties = ['revoked', 'key-expired', 'sig-expired', - 'key-missing', 'crl-missing', 'crl-too-old', 'bad-policy', - 'sys-error']; - let result = {}; - for (let i=0; i< properties.length; i++){ - if ( _rawSigObject.hasOwnProperty(properties[i]) ){ - result[properties[i]] = _rawSigObject[properties[i]]; + this.getFingerprint = function(){ + if (!_rawSigObject.fingerprint){ + return gpgme_error('SIG_WRONG'); + } else { + return _rawSigObject.fingerprint; } - } - return result; - }; -} + }; + + /** + * The expiration of this Signature as Javascript date, or null if + * signature does not expire + * @returns {Date | null} + */ + this.getExpiration = function(){ + if (!_rawSigObject.exp_timestamp){ + return null; + } + return new Date(_rawSigObject.exp_timestamp* 1000); + }; + + /** + * The creation date of this Signature in Javascript Date + * @returns {Date} + */ + this.getTimestamp= function (){ + return new Date(_rawSigObject.timestamp * 1000); + }; + + /** + * The overall validity of the key. If false, errorDetails may contain + * additional information. + */ + this.getValid= function() { + if (_rawSigObject.summary.valid === true){ + return true; + } else { + return false; + } + }; + + /** + * gives more information on non-valid signatures. Refer to the gpgme + * docs https://www.gnupg.org/documentation/manuals/gpgme/Verify.html + * for details on the values. + * @returns {Object} Object with boolean properties + */ + this.getErrorDetails = function (){ + let properties = ['revoked', 'key-expired', 'sig-expired', + 'key-missing', 'crl-missing', 'crl-too-old', 'bad-policy', + 'sys-error']; + let result = {}; + for (let i=0; i< properties.length; i++){ + if ( _rawSigObject.hasOwnProperty(properties[i]) ){ + result[properties[i]] = _rawSigObject[properties[i]]; + } + } + return result; + }; + } /** * Convenience getter for {@link getFingerprint} |