[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Protocols and Engines

GPGME supports several cryptographic protocols, however, it does not implement them. Rather it uses backends (also called engines) which implement the protocol. GPGME uses inter-process communication to pass data back and forth between the application and the backend, but the details of the communication protocol and invocation of the backends is completely hidden by the interface. All complexity is handled by GPGME. Where an exchange of information between the application and the backend is necessary, GPGME provides the necessary callback function hooks and further interfaces.

Data type: enum GpgmeProtocol
The GpgmeProtocol type specifies the set of possible protocol values that are supported by GPGME. The following protocols are supported:

GPGME_PROTOCOL_OpenPGP
This specifies the OpenPGP protocol.
GPGME_PROTOCOL_CMS
This specifies the Cryptographic Message Syntax.

3.1 Engine Version Check  Verifying the engine version.
3.2 Engine Information  Obtaining more information about the engines.
3.3 OpenPGP  Support for the OpenPGP protocol.
3.4 Cryptographic Message Syntax  Support for the CMS.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Engine Version Check

Function: GpgmeError gpgme_engine_check_version (GpgmeProtocol protocol)
The function gpgme_engine_check_version verifies that the engine implementing the protocol PROTOCOL is installed in the expected path and meets the version requirement of GPGME.

This function returns GPGME_No_Error if the engine is available and GPGME_Invalid_Engine if it is not.

Function: GpgmeError gpgme_check_engine (void)
The function gpgme_check_engine is equivalent to

 
gpgme_engine_check_version (GPGME_PROTOCOL_OpenPGP);

This function is deprecated and provided for backwards compatibility only. It is obsoleted by gpgme_engine_check_version.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Engine Information

Function: const char * gpgme_get_engine_info (void)
The function gpgme_get_engine_info returns an XML string containing information about the available protocols and the engine which implement them. The following information is returned for each engine:

`<protocol>'
The name of the protocol.
`<version>'
The version of the engine.
`<path>'
The path to the engine binary.

A string is always returned. If an error occurs, the string will contain an `<error>' tag with a description of the failure.

Here is the example output of what gpgme_get_engine_info might return on your system:

 
<EngineInfo>
 <engine>
  <protocol>OpenPGP</protocol>
  <version>1.0.6</version>
  <path>/usr/bin/gpg</path>
 </engine>
 <engine>
  <protocol>CMS</protocol>
  <version>0.0.0</version>
  <path>/usr/bin/gpgsm</path>
 </engine>
</EngineInfo>


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 OpenPGP

OpenPGP is implemented by GnuPG, the GNU Privacy Guard. This is the first protocol that was supported by GPGME.

The OpenPGP protocol is specified by GPGME_PROTOCOL_OpenPGP.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Cryptographic Message Syntax

CMS is implemented by GpgSM, the S/MIME implementation for GnuPG.

The CMS protocol is specified by GPGME_PROTOCOL_CMS.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by John Goerzen on November, 21 2002 using texi2html