diff options
author | Maximilian Krambach <[email protected]> | 2018-04-24 17:29:32 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-04-24 17:29:32 +0000 |
commit | e2aa8066a9b3ce694169ad9fcc26cae486a804af (patch) | |
tree | 38ee5d3a1b7ff50e33829e3a992ec58db0e6fb71 /lang/js/src/Key.js | |
parent | js: change in initialization ancd connection handling (diff) | |
download | gpgme-e2aa8066a9b3ce694169ad9fcc26cae486a804af.tar.gz gpgme-e2aa8066a9b3ce694169ad9fcc26cae486a804af.zip |
js: Key object adjustments after discussion
--
* src/aKey.js changed fingerprint to setter (to avoid overwrites)
* src/gpgmejs_openpgpjs.js
- Added a class GPGME_Key_openpgpmode, which allows for renaming and
deviation from GPGME.
- renamed classes *_openPGPCompatibility to *_openpgpmode. They are
not fully compatible, but only offer a subset of properties. Also,
the name seems less clunky
Diffstat (limited to 'lang/js/src/Key.js')
-rw-r--r-- | lang/js/src/Key.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lang/js/src/Key.js b/lang/js/src/Key.js index d8f16c55..f59b9901 100644 --- a/lang/js/src/Key.js +++ b/lang/js/src/Key.js @@ -32,10 +32,12 @@ import {GPGMEJS_Error} from './Errors' export class GPGME_Key { constructor(fingerprint){ - if (isFingerprint(fingerprint) === true){ + this.fingerprint = fingerprint; + } + + set fingerprint(fpr){ + if (isFingerprint(fpr) === true && !this._fingerprint){ this._fingerprint = fingerprint; - } else { - return new GPGMEJS_Error('WRONGPARAM', 'Key.js: invalid fingerprint'); } } |