Next: Crypto Engine, Up: Context Attributes
The function
gpgme_set_protocolsets the protocol used within the context ctx to proto. All crypto operations will be performed by the crypto engine configured for that protocol. See Protocols and Engines.Setting the protocol with
gpgme_set_protocoldoes not check if the crypto engine for that protocol is available and installed correctly. See Engine Version Check.The function returns the error code
GPG_ERR_NO_ERRORif the protocol could be set successfully, andGPG_ERR_INV_VALUEif protocol is not a valid protocol.