comparison sat/bridge/bridge_constructor/bridge_template.ini @ 2658:4e130cc9bfc0

core (memore/encryption): new methods and checks: Following methods are now available though bridge: - messageEncryptionStop - messageEncryptionGet: retrieve encryption data for a message session - encryptionPluginsGet: retrieve all registered encryption plugin Following methods are available for internal use: - getPlugins: retrieve registerd plugins - getNSFromName: retrieve namespace from plugin name - getBridgeData: serialise session data (to be used with bridge) - markAsEncrypted: mark message data as encrypted (to be set by encryption plugin in MessageReceived trigger) Behaviours improvments: - start and stop send messageEncryptionStarted and messageEncryptionStopped signals, and a message feedback - new "replace" arguments in start allows to replace a plugin if one is already running (instead of raising a ConflictError) - plugins declare themselves as "directed" (i.e. working with only one device at a time) or not. This is checked while dealing with jids, an exception is raised when a full jid is received for a non directed encryption. - use of new data_format (de)serialise
author Goffi <goffi@goffi.org>
date Sat, 11 Aug 2018 18:24:55 +0200
parents b8600f8130ac
children 5060cbeec01e
comparison
equal deleted inserted replaced
2657:9190874a8ac5 2658:4e130cc9bfc0
436 doc_param_5=%(doc_profile_key)s 436 doc_param_5=%(doc_profile_key)s
437 437
438 [messageEncryptionStart] 438 [messageEncryptionStart]
439 type=method 439 type=method
440 category=core 440 category=core
441 sig_in=sss 441 sig_in=ssbs
442 sig_out= 442 sig_out=
443 param_1_default='' 443 param_1_default=''
444 param_2_default="@NONE@" 444 param_2_default=False
445 param_3_default="@NONE@"
445 doc=Start an encryption session 446 doc=Start an encryption session
446 doc_param_0=to_jid: JID of the recipient (bare_jid if it must be encoded for all devices) 447 doc_param_0=to_jid: JID of the recipient (bare jid if it must be encrypted for all devices)
447 doc_param_1=encryption_ns: Namespace of the encryption algorithm to use 448 doc_param_1=encryption_ns: Namespace of the encryption algorithm to use
448 doc_param_2=%(doc_profile_key)s 449 doc_param_2=replace: If True and an encryption session already exists, it will be replaced by this one
450 else a ConflictError will be raised
451 doc_param_3=%(doc_profile_key)s
452
453 [messageEncryptionStop]
454 type=method
455 category=core
456 sig_in=ss
457 sig_out=
458 doc=Start an encryption session
459 doc_param_0=to_jid: JID of the recipient (full jid if encryption must be stopped for one device only)
460 doc_param_1=%(doc_profile_key)s
461
462 [messageEncryptionGet]
463 type=method
464 category=core
465 sig_in=ss
466 sig_out=s
467 doc=Retrieve encryption data for a given entity
468 doc_param_0=to_jid: bare JID of the recipient
469 doc_param_1=%(doc_profile_key)s
470 doc_return=[JSON_OBJ] empty string if session is unencrypted, else a json encoded objects.
471 In case of dict, following keys are always present:
472 - name: human readable name of the encryption algorithm
473 - namespace: namespace of the plugin
474 following key can be present if suitable:
475 - directed_devices: list or resource where session is encrypted
476
477 [encryptionPluginsGet]
478 type=method
479 category=core
480 sig_in=
481 sig_out=aa{ss}
482 doc=Retrieve registered plugins for encryption
449 483
450 [setPresence] 484 [setPresence]
451 type=method 485 type=method
452 category=core 486 category=core
453 sig_in=ssa{ss}s 487 sig_in=ssa{ss}s