diff options
| author | Maximilian Krambach <[email protected]> | 2018-08-29 15:45:55 +0000 | 
|---|---|---|
| committer | Maximilian Krambach <[email protected]> | 2018-08-29 15:45:55 +0000 | 
| commit | 61ac70cfb5cf58f92cd97abdde7152040c51201c (patch) | |
| tree | c3baac7a5824f782b13cd9942e96ba52d57111ab /lang/js/src | |
| parent | python bindings: core (diff) | |
| download | gpgme-61ac70cfb5cf58f92cd97abdde7152040c51201c.tar.gz gpgme-61ac70cfb5cf58f92cd97abdde7152040c51201c.zip | |
js: return base64 after encrypt with armor=false
--
* src/gpgmejs.js/encrypt: the encrypted data were converted back to a
  (incorrect) string, whereas they should be data with no encoding
  specified. Returning base64 data is the expected way.
* DemoExtension: caught yet another usage of old syntax.
Diffstat (limited to '')
| -rw-r--r-- | lang/js/src/gpgmejs.js | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/lang/js/src/gpgmejs.js b/lang/js/src/gpgmejs.js index 08f80fc2..295cc043 100644 --- a/lang/js/src/gpgmejs.js +++ b/lang/js/src/gpgmejs.js @@ -154,8 +154,12 @@ export class GpgME {          if (msg instanceof Error){              return Promise.reject(msg);          } -        msg.setParameter('armor', armor); - +        if (armor === false){ +            msg.setParameter('armor', false); +            msg.expected = 'base64'; +        } else if (armor === true) { +            msg.setParameter('armor', true); +        }          if (base64 === true) {              msg.setParameter('base64', true);          } | 
