Next: , Previous: , Up: How to use GnuTLS in applications   [Contents][Index]


6.4 Associating the credentials

Each authentication method is associated with a key exchange method, and a credentials type. The contents of the credentials is method-dependent, e.g. certificates for certificate authentication and should be initialized and associated with a session (see gnutls_credentials_set). A mapping of the key exchange methods with the credential types is shown in Table 6.2.

Authentication methodKey exchangeClient credentialsServer credentials
CertificateKX_RSA, KX_DHE_RSA, KX_DHE_DSS, KX_ECDHE_RSA, KX_ECDHE_ECDSACRD_CERTIFICATECRD_CERTIFICATE
Password and certificateKX_SRP_RSA, KX_SRP_DSSCRD_SRPCRD_CERTIFICATE, CRD_SRP
PasswordKX_SRPCRD_SRPCRD_SRP
AnonymousKX_ANON_DH, KX_ANON_ECDHCRD_ANONCRD_ANON
Pre-shared keyKX_PSK, KX_DHE_PSK, KX_ECDHE_PSKCRD_PSKCRD_PSK

Table 6.2: Key exchange algorithms and the corresponding credential types.