ESP SDK C API
Entities/Objects | Functions
Authentication

Entities/Objects

typedef struct EspCredentials EspCredentials

Enumeration Types

Enumerator:
ESP_CREDENTIALS_NONE 

No authentication

ESP_CREDENTIALS_USER_PASSWORD 

Any authentication that requires a user and password (such as PAM or Kerberos)

ESP_CREDENTIALS_SERVER_RSA 

RSA authentication with the server framework

ESP_CREDENTIALS_PROJECT_RSA 

Not supported

ESP_CREDENTIALS_CUSTOM 

Custom authentication, not implemented

Functions

ESPAPICALL struct EspCredentialsesp_credentials_create (ESP_CREDENTIALS_T type, struct EspError *error)
ESPAPICALL int32_t esp_credentials_set_user (EspCredentials *credentials, const char *user, EspError *error)
ESPAPICALL int32_t esp_credentials_set_password (EspCredentials *credentials, const char *password, EspError *error)
ESPAPICALL int32_t esp_credentials_set_keyfile (EspCredentials *credentials, const char *keyfile, EspError *error)
ESPAPICALL int32_t esp_credentials_encrypt_fields (EspCredentials *credentials, const int32_t encrypt, EspError *error)
ESPAPICALL int32_t esp_credentials_free (EspCredentials *credentials, EspError *error)

Function Documentation

ESPAPICALL struct EspCredentials* esp_credentials_create ( ESP_CREDENTIALS_T  type,
struct EspError *  error 
) [read]

Creates an EspCredentials object

Returns:
EspCredentials, NULL on error
Parameters:
typeType of credentials to create
ESPAPICALL int32_t esp_credentials_encrypt_fields ( EspCredentials credentials,
const int32_t  encrypt,
EspError *  error 
)

Whether to encrypt fields in the authentication message for non SSL connections. For SSL connections this setting is ignored

Returns:
0 on success details in case of error
Parameters:
credentialsEspCredentials object to set the value for
encryptnonzero field values should be encrypted
ESPAPICALL int32_t esp_credentials_free ( EspCredentials credentials,
EspError *  error 
)

Frees an EspCredentials object previously created with esp_credentials_create()

Returns:
0 on success
Parameters:
credentialsEspCredentials to free
ESPAPICALL int32_t esp_credentials_set_keyfile ( EspCredentials credentials,
const char *  keyfile,
EspError *  error 
)

Set the name of the file that contains a PEM encoded unencrypted private key. Currently only RSA keys are supported. The file is not read until authentication takes place, at which time an error may be generated.

Returns:
0 on success details in case of error
Parameters:
credentialsAn ESP_CREDENTIALS_SERVER_RSA type EspCredentials object
keyfilename of the file containing the private key to use
ESPAPICALL int32_t esp_credentials_set_password ( EspCredentials credentials,
const char *  password,
EspError *  error 
)

Sets the password field for authentications that require it.

Returns:
0 on success details in case of error
Parameters:
credentialsAn ESP_CREDENTIALS_USER_PASSWORD type EspCredentials object
passwordpassword, shared secret, to set
ESPAPICALL int32_t esp_credentials_set_user ( EspCredentials credentials,
const char *  user,
EspError *  error 
)

Sets the user or alias of the authentication scheme if one is required

Returns:
0 on success details in case of error
Parameters:
userUser name or alias
 All Classes Variables