Closed juniorz closed 6 years ago
We decided to go for (from a specification perspective):
"""
ALLOW_V3
Allow version 3 of the OTR protocol to be used.
ALLOW_V4
Allow version 4 of the OTR protocol to be used.
REQUIRE_ENCRYPTION
Refuse to send unencrypted messages.
SEND_WHITESPACE_TAG
Advertise your support of OTR using the whitespace tag.
WHITESPACE_START_DAKE
Start the OTR DAKE when you receive a whitespace tag.
ERROR_START_DAKE
Start the OTR DAKE when you receive an OTR Error Message.
REQUIRE_INTERACTIVE
Refuse to start with a non-interactive DAKE.
IDENTITY_START_DAKE
Start OTR interactive DAKE with the sending of the Identity Message only.
TRY_DAKEZ_WHEN_OFFLINE
Try to start an offline conversation with DAKEZ.
REQUIRE_AUTHENTICATED
Always start an OTR conversation with authenticated parties only.
From the library to plugin perspective:
#define OTRL_POLICY_NEVER 0x00
#define OTRL_POLICY_OPPORTUNISTIC \
( OTRL_POLICY_ALLOW_V3 | \
OTRL_POLICY_ALLOW_V4 | \
OTRL_POLICY_SEND_WHITESPACE_TAG | \
OTRL_POLICY_WHITESPACE_START_AKE | \
OTRL_POLICY_ERROR_START_AKE )
#define OTRL_POLICY_MANUAL \
( OTRL_POLICY_ALLOW_V3 | \
OTRL_POLICY_ALLOW_V4)
#define OTRL_POLICY_ALWAYS \
( OTRL_POLICY_ALLOW_V3 | \
OTRL_POLICY_ALLOW_V4 | \
OTRL_POLICY_REQUIRE_ENCRYPTION | \
OTRL_POLICY_WHITESPACE_START_AKE | \
OTRL_POLICY_ERROR_START_AKE )
#define OTRL_POLICY_DEFAULT OTRL_POLICY_OPPORTUNISTIC
We can further include
We can have:
OTRL_POLICY_HIGHEST_SEC
OTRL_POLICY_ALLOW_V3 | \
OTRL_POLICY_ALLOW_V4 | \
OTRL_POLICY_SEND_WHITESPACE_TAG | \
OTRL_POLICY_WHITESPACE_START_AKE | \
OTRL_POLICY_ERROR_START_AKE
REQUIRE_AUTHENTICATED | \
REQUIRE_INTERACTIVE \
IDENTITY_START_DAKE \
)
OTRL_POLICY_OTRV4_FULL
OTRL_POLICY_ALLOW_V4 | \
OTRL_POLICY_SEND_WHITESPACE_TAG | \
OTRL_POLICY_WHITESPACE_START_AKE | \
OTRL_POLICY_ERROR_START_AKE
)
Most of the policies should be implemented in libotr-ng - as discussed in the email thread.
@olabini yes! already had an issue for that :)
OK, this story has been broken up into several smaller stories:
Thanks! @olabini
Should we implement the policies in the plugin?