Passphrase support for messageToSend() in the p≡p engine

Using messageToSend() as part of the implementation of an API call

API calls MUST behave all the same regarding passphrases. When the configured passphrase does not work they return PEP_PASSPHRASE_REQUIRED or PEP_WRONG_PASSPHRASE.

Using messageToSend() as part of a network protocol implementation executing asynchronously (i.e. p≡p Sync)

When a protocol implementation of the p≡p engine using messageToSend() cannot sign or encrypt with an empty passphrase and not with the configured passphrase it MUST call messageToSend() with a NULL instead of a struct _message object.

In this case the handler for messageToSend() in the p≡p adapter MAY configure a passphrase to the PEP_SESSION used for the protocol and return PEP_STATUS_OK. The protocol implementation will retry with the now configured passphrase.

When the handler has no passphrase (left) to configure it MUST return PEP_PASSPHRASE_REQUIRED or PEP_WRONG_PASSPHRASE. Then the protocol implementation MUST use notifyHandshake() with SYNC_PASSPHRASE_REQUIRED to inform the app.

The protocol implementation MUST repeat this until success.