aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/permittedOperations.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-06-08 15:54:58 +0000
committerMaximilian Krambach <[email protected]>2018-06-08 15:54:58 +0000
commitc072675f3f2d734297a348c6de810148fb1424a2 (patch)
tree9e0ddfd642f26b6adfd793a7db9241c404bb891d /lang/js/src/permittedOperations.js
parentjs: change Keyinfo timestamps into javascript date (diff)
downloadgpgme-c072675f3f2d734297a348c6de810148fb1424a2.tar.gz
gpgme-c072675f3f2d734297a348c6de810148fb1424a2.zip
js: change chunksize handling and decoding
-- * the nativeApp now sends all data in one base64-encoded string, which needs reassembly, but in a much easier way now. * there are some new performance problems now, especially with decrypting data
Diffstat (limited to 'lang/js/src/permittedOperations.js')
-rw-r--r--lang/js/src/permittedOperations.js81
1 files changed, 36 insertions, 45 deletions
diff --git a/lang/js/src/permittedOperations.js b/lang/js/src/permittedOperations.js
index 445a40cc..6ac33af9 100644
--- a/lang/js/src/permittedOperations.js
+++ b/lang/js/src/permittedOperations.js
@@ -37,11 +37,8 @@
5000 ms would be too short
answer: <Object>
type: <String< The content type of answer expected
- data: Array<String> The payload property of the answer. May be
- partial and in need of concatenation
- params: Array<String> Information that do not change throughout
- the message
- infos: Array<*> arbitrary information that may result in a list
+ data: <Object>
+ the properties expected and their type, eg: {'data':'string'}
}
}
*/
@@ -67,9 +64,6 @@ export const permittedOperations = {
allowed: ['string'],
array_allowed: true
},
- 'chunksize': {
- allowed: ['number']
- },
'base64': {
allowed: ['boolean']
},
@@ -101,9 +95,10 @@ export const permittedOperations = {
},
answer: {
type: ['ciphertext'],
- data: ['data'],
- params: ['base64'],
- infos: []
+ data: {
+ 'data': 'string',
+ 'base64':'boolean'
+ }
}
},
@@ -119,18 +114,18 @@ export const permittedOperations = {
allowed: ['string'],
allowed_data: ['cms', 'openpgp']
},
- 'chunksize': {
- allowed: ['number'],
- },
'base64': {
allowed: ['boolean']
}
},
answer: {
type: ['plaintext'],
- data: ['data'],
- params: ['base64', 'mime'],
- infos: ['signatures']
+ data: {
+ 'data': 'string',
+ 'base64': 'boolean',
+ 'mime': 'boolean',
+ 'signatures': 'object'
+ }
}
},
@@ -149,9 +144,6 @@ export const permittedOperations = {
allowed: ['string'],
allowed_data: ['cms', 'openpgp']
},
- 'chunksize': {
- allowed: ['number'],
- },
'sender': {
allowed: ['string'],
},
@@ -169,10 +161,11 @@ export const permittedOperations = {
},
answer: {
type: ['signature', 'ciphertext'],
- data: ['data'], // Unless armor mode is used a Base64 encoded binary
- // signature. In armor mode a string with an armored
- // OpenPGP or a PEM message.
- params: ['base64']
+ data: {
+ 'data': 'string',
+ 'base64':'boolean'
+ }
+
}
},
@@ -186,9 +179,6 @@ export const permittedOperations = {
allowed: ['string'],
allowed_data: ['cms', 'openpgp']
},
- 'chunksize': {
- allowed: ['number'],
- },
'secret': {
allowed: ['boolean']
},
@@ -220,9 +210,10 @@ export const permittedOperations = {
},
answer: {
type: ['keys'],
- data: [],
- params: ['base64'],
- infos: ['keys']
+ data: {
+ 'base64': 'boolean',
+ 'keys': 'object'
+ }
}
},
@@ -233,9 +224,6 @@ export const permittedOperations = {
allowed: ['string'],
allowed_data: ['cms', 'openpgp']
},
- 'chunksize': {
- allowed: ['number'],
- },
'keys': {
allowed: ['string'],
array_allowed: true
@@ -259,8 +247,10 @@ export const permittedOperations = {
},
answer: {
type: ['keys'],
- data: ['data'],
- params: ['base64']
+ data: {
+ 'data': 'string',
+ 'base64': 'boolean'
+ }
}
},
@@ -280,10 +270,10 @@ export const permittedOperations = {
},
},
answer: {
- infos: ['result'],
type: [],
- data: [],
- params: []
+ data: {
+ 'result': 'Object'
+ }
}
},
@@ -299,15 +289,15 @@ export const permittedOperations = {
allowed: ['string'],
allowed_data: ['cms', 'openpgp']
},
- // 'secret': { not yet implemented
+ // 'secret': { not implemented
// allowed: ['boolean']
// }
},
answer: {
- data: [],
- params:['success'],
- infos: []
+ data: {
+ 'success': 'boolean'
+ }
}
},
@@ -316,9 +306,10 @@ export const permittedOperations = {
optional: {},
answer: {
type: [''],
- data: ['gpgme'],
- infos: ['info'],
- params:[]
+ data: {
+ 'gpgme': 'string',
+ 'info': 'object'
+ }
}
}