TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _ISCSI_CHAP_AUTH_CONFIG_NVDATA |
struct | CHAP_HASH |
struct | _ISCSI_CHAP_AUTH_DATA |
Macros | |
#define | ISCSI_AUTH_METHOD_CHAP "CHAP" |
#define | ISCSI_KEY_CHAP_ALGORITHM "CHAP_A" |
#define | ISCSI_KEY_CHAP_IDENTIFIER "CHAP_I" |
#define | ISCSI_KEY_CHAP_CHALLENGE "CHAP_C" |
#define | ISCSI_KEY_CHAP_NAME "CHAP_N" |
#define | ISCSI_KEY_CHAP_RESPONSE "CHAP_R" |
#define | ISCSI_CHAP_ALGORITHM_MD5 5 |
#define | ISCSI_CHAP_ALGORITHM_SHA256 7 |
#define | ISCSI_CHAP_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE |
#define | ISCSI_CHAP_STEP_ONE 1 |
#define | ISCSI_CHAP_STEP_TWO 2 |
#define | ISCSI_CHAP_STEP_THREE 3 |
#define | ISCSI_CHAP_STEP_FOUR 4 |
Typedefs | |
typedef struct _ISCSI_CHAP_AUTH_CONFIG_NVDATA | ISCSI_CHAP_AUTH_CONFIG_NVDATA |
typedef UINTN(EFIAPI * | CHAP_HASH_GET_CONTEXT_SIZE) (VOID) |
typedef BOOLEAN(EFIAPI * | CHAP_HASH_INIT) (OUT VOID *Context) |
typedef BOOLEAN(EFIAPI * | CHAP_HASH_UPDATE) (IN OUT VOID *Context, IN CONST VOID *Data, IN UINTN DataSize) |
typedef BOOLEAN(EFIAPI * | CHAP_HASH_FINAL) (IN OUT VOID *Context, OUT UINT8 *HashValue) |
typedef struct _ISCSI_CHAP_AUTH_DATA | ISCSI_CHAP_AUTH_DATA |
Functions | |
EFI_STATUS | IScsiCHAPOnRspReceived (IN ISCSI_CONNECTION *Conn) |
EFI_STATUS | IScsiCHAPToSendReq (IN ISCSI_CONNECTION *Conn, IN OUT NET_BUF *Pdu) |
VOID | IScsiCHAPInitHashList (VOID) |
The header file of CHAP configuration.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file IScsiCHAP.h.
#define ISCSI_AUTH_METHOD_CHAP "CHAP" |
Definition at line 12 of file IScsiCHAP.h.
#define ISCSI_CHAP_ALGORITHM_MD5 5 |
Definition at line 24 of file IScsiCHAP.h.
#define ISCSI_CHAP_ALGORITHM_SHA256 7 |
Definition at line 25 of file IScsiCHAP.h.
#define ISCSI_CHAP_MAX_DIGEST_SIZE SHA256_DIGEST_SIZE |
Definition at line 31 of file IScsiCHAP.h.
#define ISCSI_CHAP_STEP_FOUR 4 |
Definition at line 36 of file IScsiCHAP.h.
#define ISCSI_CHAP_STEP_ONE 1 |
Definition at line 33 of file IScsiCHAP.h.
#define ISCSI_CHAP_STEP_THREE 3 |
Definition at line 35 of file IScsiCHAP.h.
#define ISCSI_CHAP_STEP_TWO 2 |
Definition at line 34 of file IScsiCHAP.h.
#define ISCSI_KEY_CHAP_ALGORITHM "CHAP_A" |
Definition at line 14 of file IScsiCHAP.h.
#define ISCSI_KEY_CHAP_CHALLENGE "CHAP_C" |
Definition at line 16 of file IScsiCHAP.h.
#define ISCSI_KEY_CHAP_IDENTIFIER "CHAP_I" |
Definition at line 15 of file IScsiCHAP.h.
#define ISCSI_KEY_CHAP_NAME "CHAP_N" |
Definition at line 17 of file IScsiCHAP.h.
#define ISCSI_KEY_CHAP_RESPONSE "CHAP_R" |
Definition at line 18 of file IScsiCHAP.h.
Definition at line 74 of file IScsiCHAP.h.
typedef UINTN(EFIAPI * CHAP_HASH_GET_CONTEXT_SIZE) (VOID) |
Definition at line 54 of file IScsiCHAP.h.
typedef BOOLEAN(EFIAPI * CHAP_HASH_INIT) (OUT VOID *Context) |
Definition at line 60 of file IScsiCHAP.h.
typedef BOOLEAN(EFIAPI * CHAP_HASH_UPDATE) (IN OUT VOID *Context, IN CONST VOID *Data, IN UINTN DataSize) |
Definition at line 66 of file IScsiCHAP.h.
typedef struct _ISCSI_CHAP_AUTH_DATA ISCSI_CHAP_AUTH_DATA |
ISCSI CHAP Authentication Data
VOID IScsiCHAPInitHashList | ( | VOID | ) |
Initialize the CHAP_A=<A1,A2...> value string for the entire driver, to be sent by the initiator in ISCSI_CHAP_STEP_ONE.
This function sanity-checks the internal table of supported CHAP hashing algorithms, as well.
Definition at line 635 of file IScsiCHAP.c.
EFI_STATUS IScsiCHAPOnRspReceived | ( | IN ISCSI_CONNECTION * | Conn | ) |
This function checks the received iSCSI Login Response during the security negotiation stage.
[in] | Conn | The iSCSI connection. |
EFI_SUCCESS | The Login Response passed the CHAP validation. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of protocol error occurred. |
Others | Other errors as indicated. |
Definition at line 215 of file IScsiCHAP.c.
EFI_STATUS IScsiCHAPToSendReq | ( | IN ISCSI_CONNECTION * | Conn, |
IN OUT NET_BUF * | Pdu | ||
) |
This function fills the CHAP authentication information into the login PDU during the security negotiation stage in the iSCSI connection login.
[in] | Conn | The iSCSI connection. |
[in,out] | Pdu | The PDU to send out. |
EFI_SUCCESS | All check passed and the phase-related CHAP authentication info is filled into the iSCSI PDU. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_PROTOCOL_ERROR | Some kind of protocol error occurred. |
Definition at line 470 of file IScsiCHAP.c.