server over the network, or to a Hardware Security Module (HSM) attached to the system it\r
runs on, or anything else that is capable of providing the key management service.\r
\r
- Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials are licensed and made available under\r
- the terms and conditions of the BSD License that accompanies this distribution.\r
- The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
// Where appropriate, EFI_KMS_DATA_TYPE values may be combined using a bitwise 'OR'\r
// operation to indicate support for multiple data types.\r
//\r
-#define EFI_KMS_DATA_TYPE_NONE 0\r
-#define EFI_KMS_DATA_TYPE_BINARY 1\r
-#define EFI_KMS_DATA_TYPE_ASCII 2\r
-#define EFI_KMS_DATA_TYPE_UNICODE 4\r
-#define EFI_KMS_DATA_TYPE_UTF8 8\r
-\r
+#define EFI_KMS_DATA_TYPE_NONE 0\r
+#define EFI_KMS_DATA_TYPE_BINARY 1\r
+#define EFI_KMS_DATA_TYPE_ASCII 2\r
+#define EFI_KMS_DATA_TYPE_UNICODE 4\r
+#define EFI_KMS_DATA_TYPE_UTF8 8\r
\r
//\r
// The key formats recognized by the KMS protocol are defined by an EFI_GUID which specifies\r
}\r
///@}\r
\r
-#define EFI_KMS_ATTRIBUTE_TYPE_NONE 0x00\r
-#define EFI_KMS_ATTRIBUTE_TYPE_INTEGER 0x01\r
-#define EFI_KMS_ATTRIBUTE_TYPE_LONG_INTEGER 0x02\r
-#define EFI_KMS_ATTRIBUTE_TYPE_BIG_INTEGER 0x03\r
-#define EFI_KMS_ATTRIBUTE_TYPE_ENUMERATION 0x04\r
-#define EFI_KMS_ATTRIBUTE_TYPE_BOOLEAN 0x05\r
-#define EFI_KMS_ATTRIBUTE_TYPE_BYTE_STRING 0x06\r
-#define EFI_KMS_ATTRIBUTE_TYPE_TEXT_STRING 0x07\r
-#define EFI_KMS_ATTRIBUTE_TYPE_DATE_TIME 0x08\r
-#define EFI_KMS_ATTRIBUTE_TYPE_INTERVAL 0x09\r
-#define EFI_KMS_ATTRIBUTE_TYPE_STRUCTURE 0x0A\r
-#define EFI_KMS_ATTRIBUTE_TYPE_DYNAMIC 0x0B\r
+#define EFI_KMS_ATTRIBUTE_TYPE_NONE 0x00\r
+#define EFI_KMS_ATTRIBUTE_TYPE_INTEGER 0x01\r
+#define EFI_KMS_ATTRIBUTE_TYPE_LONG_INTEGER 0x02\r
+#define EFI_KMS_ATTRIBUTE_TYPE_BIG_INTEGER 0x03\r
+#define EFI_KMS_ATTRIBUTE_TYPE_ENUMERATION 0x04\r
+#define EFI_KMS_ATTRIBUTE_TYPE_BOOLEAN 0x05\r
+#define EFI_KMS_ATTRIBUTE_TYPE_BYTE_STRING 0x06\r
+#define EFI_KMS_ATTRIBUTE_TYPE_TEXT_STRING 0x07\r
+#define EFI_KMS_ATTRIBUTE_TYPE_DATE_TIME 0x08\r
+#define EFI_KMS_ATTRIBUTE_TYPE_INTERVAL 0x09\r
+#define EFI_KMS_ATTRIBUTE_TYPE_STRUCTURE 0x0A\r
+#define EFI_KMS_ATTRIBUTE_TYPE_DYNAMIC 0x0B\r
\r
typedef struct {\r
///\r
/// Length in bytes of the KeyData.\r
///\r
- UINT32 KeySize;\r
+ UINT32 KeySize;\r
///\r
/// The data of the key.\r
///\r
- UINT8 KeyData[1];\r
+ UINT8 KeyData[1];\r
} EFI_KMS_FORMAT_GENERIC_DYNAMIC;\r
\r
typedef struct {\r
///\r
/// The size in bytes for the client identifier.\r
///\r
- UINT16 ClientIdSize;\r
+ UINT16 ClientIdSize;\r
///\r
/// Pointer to a valid client identifier.\r
///\r
- VOID *ClientId;\r
+ VOID *ClientId;\r
///\r
/// The client name string type used by this client. The string type set here must be one of\r
/// the string types reported in the ClientNameStringTypes field of the KMS protocol. If the\r
/// KMS does not support client names, this field should be set to EFI_KMS_DATA_TYPE_NONE.\r
///\r
- UINT8 ClientNameType;\r
+ UINT8 ClientNameType;\r
///\r
/// The size in characters for the client name. This field will be ignored if\r
/// ClientNameStringType is set to EFI_KMS_DATA_TYPE_NONE. Otherwise, it must contain\r
/// number of characters contained in the ClientName field.\r
///\r
- UINT8 ClientNameCount;\r
+ UINT8 ClientNameCount;\r
///\r
/// Pointer to a client name. This field will be ignored if ClientNameStringType is set to\r
/// EFI_KMS_DATA_TYPE_NONE. Otherwise, it must point to a valid string of the specified type.\r
///\r
- VOID *ClientName;\r
+ VOID *ClientName;\r
} EFI_KMS_CLIENT_INFO;\r
\r
typedef struct {\r
///\r
/// The size of the KeyIdentifier field in bytes. This field is limited to the range 0 to 255.\r
///\r
- UINT8 KeyIdentifierSize;\r
+ UINT8 KeyIdentifierSize;\r
///\r
/// Pointer to an array of KeyIdentifierType elements.\r
///\r
- VOID *KeyIdentifier;\r
+ VOID *KeyIdentifier;\r
///\r
/// An EFI_GUID which specifies the algorithm and key value size for this key.\r
///\r
- EFI_GUID KeyFormat;\r
+ EFI_GUID KeyFormat;\r
///\r
/// Pointer to a key value for a key specified by the KeyFormat field. A NULL value for this\r
/// field indicates that no key is available.\r
///\r
- VOID *KeyValue;\r
+ VOID *KeyValue;\r
///\r
/// Specifies the results of KMS operations performed with this descriptor. This field is used\r
/// to indicate the status of individual operations when a KMS function is called with multiple\r
/// Part of a tag-type-length triplet that identifies the KeyAttributeData formatting. The\r
/// definition of the value is outside the scope of this standard and may be defined by the KMS.\r
///\r
- UINT16 Tag;\r
+ UINT16 Tag;\r
///\r
/// Part of a tag-type-length triplet that identifies the KeyAttributeData formatting. The\r
/// definition of the value is outside the scope of this standard and may be defined by the KMS.\r
///\r
- UINT16 Type;\r
+ UINT16 Type;\r
///\r
/// Length in bytes of the KeyAttributeData.\r
///\r
- UINT32 Length;\r
+ UINT32 Length;\r
///\r
/// An array of bytes to hold the attribute data associated with the KeyAttributeIdentifier.\r
///\r
- UINT8 KeyAttributeData[1];\r
+ UINT8 KeyAttributeData[1];\r
} EFI_KMS_DYNAMIC_FIELD;\r
\r
typedef struct {\r
///\r
/// The number of members in the EFI_KMS_DYNAMIC_ATTRIBUTE structure.\r
///\r
- UINT32 FieldCount;\r
+ UINT32 FieldCount;\r
///\r
/// An array of EFI_KMS_DYNAMIC_FIELD structures.\r
///\r
- EFI_KMS_DYNAMIC_FIELD Field[1];\r
+ EFI_KMS_DYNAMIC_FIELD Field[1];\r
} EFI_KMS_DYNAMIC_ATTRIBUTE;\r
\r
typedef struct {\r
/// by the EFI_KMS_DATA_TYPE constants, except that EFI_KMS_DATA_TYPE_BINARY is not\r
/// valid for this field.\r
///\r
- UINT8 KeyAttributeIdentifierType;\r
+ UINT8 KeyAttributeIdentifierType;\r
///\r
/// The length of the KeyAttributeIdentifier field in units defined by KeyAttributeIdentifierType\r
/// field. This field is limited to the range 0 to 255.\r
///\r
- UINT8 KeyAttributeIdentifierCount;\r
+ UINT8 KeyAttributeIdentifierCount;\r
///\r
/// Pointer to an array of KeyAttributeIdentifierType elements. For string types, there must\r
/// not be a null-termination element at the end of the array.\r
///\r
- VOID *KeyAttributeIdentifier;\r
+ VOID *KeyAttributeIdentifier;\r
///\r
/// The instance number of this attribute. If there is only one instance, the value is set to\r
/// one. If this value is set to 0xFFFF (all binary 1's) then this field should be ignored if an\r
/// field in the request. If set to 0xFFFF in the request, it will match any attribute with the\r
/// same KeyAttributeIdentifier.\r
///\r
- UINT16 KeyAttributeInstance;\r
+ UINT16 KeyAttributeInstance;\r
///\r
/// The data type of the KeyAttributeValue (e.g. struct, bool, etc.). See the list of\r
/// KeyAttributeType definitions.\r
///\r
- UINT16 KeyAttributeType;\r
+ UINT16 KeyAttributeType;\r
///\r
/// The size in bytes of the KeyAttribute field. A value of zero for this field indicates that no\r
/// key attribute value is available.\r
///\r
- UINT16 KeyAttributeValueSize;\r
+ UINT16 KeyAttributeValueSize;\r
///\r
/// Pointer to a key attribute value for the attribute specified by the KeyAttributeIdentifier\r
/// field. If the KeyAttributeValueSize field is zero, then this field must be NULL.\r
///\r
- VOID *KeyAttributeValue;\r
+ VOID *KeyAttributeValue;\r
///\r
/// KeyAttributeStatusSpecifies the results of KMS operations performed with this attribute.\r
/// This field is used to indicate the status of individual operations when a KMS function is\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_GET_SERVICE_STATUS) (\r
+(EFIAPI *EFI_KMS_GET_SERVICE_STATUS)(\r
IN EFI_KMS_PROTOCOL *This\r
);\r
\r
\r
@param[in] This Pointer to the EFI_KMS_PROTOCOL instance.\r
@param[in] Client Pointer to a valid EFI_KMS_CLIENT_INFO structure.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_REGISTER_CLIENT) (\r
+(EFIAPI *EFI_KMS_REGISTER_CLIENT)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINTN *ClientDataSize OPTIONAL,\r
IN OUT VOID **ClientData OPTIONAL\r
- ); \r
+ );\r
\r
/**\r
Request that the KMS generate one or more new keys and associate them with key identifiers.\r
type and must be freed by the caller when it is no longer\r
needed. Also, the KeyStatus field must reflect the result\r
of the request relative to that key.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_CREATE_KEY) (\r
+(EFIAPI *EFI_KMS_CREATE_KEY)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINT16 *KeyDescriptorCount,\r
On output, the KeyIdentifierSize and KeyIdentifier fields\r
will be unchanged, while the KeyFormat and KeyValue\r
fields will be updated values associated with this key\r
- identifier. Memory for the KeyValue field will be \r
+ identifier. Memory for the KeyValue field will be\r
allocated with the BOOT_SERVICES_DATA type and\r
must be freed by the caller when it is no longer needed.\r
Also, the KeyStatus field will reflect the result of the\r
request relative to the individual key descriptor.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_GET_KEY) (\r
+(EFIAPI *EFI_KMS_GET_KEY)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINT16 *KeyDescriptorCount,\r
consistent values to be associated with the given KeyId.\r
On return, the KeyStatus field will reflect the result\r
of the operation for each key request.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_ADD_KEY) (\r
+(EFIAPI *EFI_KMS_ADD_KEY)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINT16 *KeyDescriptorCount,\r
KeyValue fields are ignored, but should be 0.\r
On return, the KeyStatus field will reflect the result\r
of the operation for each key request.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_DELETE_KEY) (\r
+(EFIAPI *EFI_KMS_DELETE_KEY)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINT16 *KeyDescriptorCount,\r
On input, the fields in the structure should be NULL.\r
On output, the attribute fields will have updated values\r
for attributes associated with this key identifier.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_GET_KEY_ATTRIBUTES) (\r
+(EFIAPI *EFI_KMS_GET_KEY_ATTRIBUTES)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN UINT8 *KeyIdentifierSize,\r
are completely filled in.\r
On return the KeyAttributeStatus field will reflect the\r
result of the operation for each key attribute request.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_ADD_KEY_ATTRIBUTES) (\r
+(EFIAPI *EFI_KMS_ADD_KEY_ATTRIBUTES)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN UINT8 *KeyIdentifierSize,\r
are completely filled in.\r
On return the KeyAttributeStatus field will reflect the\r
result of the operation for each key attribute request.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_DELETE_KEY_ATTRIBUTES) (\r
+(EFIAPI *EFI_KMS_DELETE_KEY_ATTRIBUTES)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN UINT8 *KeyIdentifierSize,\r
caller when it is no longer needed. Also, the KeyStatus\r
field of each descriptor will reflect the result of the\r
request relative to that key descriptor.\r
- @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of \r
+ @param[in, out] ClientDataSize Pointer to the size, in bytes, of an arbitrary block of\r
data specified by the ClientData parameter. This\r
parameter may be NULL, in which case the ClientData\r
parameter will be ignored and no data will be\r
which will be zero if no data is returned from the KMS.\r
@param[in, out] ClientData Pointer to a pointer to an arbitrary block of data of\r
*ClientDataSize that is to be passed directly to the\r
- KMS if it supports the use of client data. This \r
- parameter may be NULL if and only if the \r
+ KMS if it supports the use of client data. This\r
+ parameter may be NULL if and only if the\r
ClientDataSize parameter is also NULL. Upon return to\r
- the caller, *ClientData points to a block of data of \r
- *ClientDataSize that was returned from the KMS. \r
+ the caller, *ClientData points to a block of data of\r
+ *ClientDataSize that was returned from the KMS.\r
If the returned value for *ClientDataSize is zero,\r
then the returned value for *ClientData must be NULL\r
and should be ignored by the caller. The KMS protocol\r
**/\r
typedef\r
EFI_STATUS\r
-(EFIAPI *EFI_KMS_GET_KEY_BY_ATTRIBUTES) (\r
+(EFIAPI *EFI_KMS_GET_KEY_BY_ATTRIBUTES)(\r
IN EFI_KMS_PROTOCOL *This,\r
IN EFI_KMS_CLIENT_INFO *Client,\r
IN OUT UINTN *KeyAttributeCount,\r
/// connected to the KMS, then a call to this function will initiate a connection. This is the\r
/// only function that is valid for use prior to the service being marked available.\r
///\r
- EFI_KMS_GET_SERVICE_STATUS GetServiceStatus;\r
+ EFI_KMS_GET_SERVICE_STATUS GetServiceStatus;\r
///\r
/// Register a specific client with the KMS.\r
///\r
- EFI_KMS_REGISTER_CLIENT RegisterClient;\r
+ EFI_KMS_REGISTER_CLIENT RegisterClient;\r
///\r
/// Request the generation of a new key and retrieve it.\r
///\r
- EFI_KMS_CREATE_KEY CreateKey;\r
+ EFI_KMS_CREATE_KEY CreateKey;\r
///\r
/// Retrieve an existing key.\r
///\r
- EFI_KMS_GET_KEY GetKey;\r
+ EFI_KMS_GET_KEY GetKey;\r
///\r
/// Add a local key to KMS database. If there is an existing key with this key identifier in the\r
/// KMS database, it will be replaced with the new key.\r
///\r
- EFI_KMS_ADD_KEY AddKey;\r
+ EFI_KMS_ADD_KEY AddKey;\r
///\r
/// Delete an existing key from the KMS database.\r
///\r
- EFI_KMS_DELETE_KEY DeleteKey;\r
+ EFI_KMS_DELETE_KEY DeleteKey;\r
///\r
/// Get attributes for an existing key in the KMS database.\r
///\r
- EFI_KMS_GET_KEY_ATTRIBUTES GetKeyAttributes;\r
+ EFI_KMS_GET_KEY_ATTRIBUTES GetKeyAttributes;\r
///\r
/// Add attributes to an existing key in the KMS database.\r
///\r
- EFI_KMS_ADD_KEY_ATTRIBUTES AddKeyAttributes;\r
+ EFI_KMS_ADD_KEY_ATTRIBUTES AddKeyAttributes;\r
///\r
/// Delete attributes for an existing key in the KMS database.\r
///\r
- EFI_KMS_DELETE_KEY_ATTRIBUTES DeleteKeyAttributes;\r
+ EFI_KMS_DELETE_KEY_ATTRIBUTES DeleteKeyAttributes;\r
///\r
/// Get existing key(s) with the specified attributes.\r
///\r
- EFI_KMS_GET_KEY_BY_ATTRIBUTES GetKeyByAttributes;\r
+ EFI_KMS_GET_KEY_BY_ATTRIBUTES GetKeyByAttributes;\r
///\r
/// The version of this EFI_KMS_PROTOCOL structure. This must be set to 0x00020040 for\r
/// the initial version of this protocol.\r
///\r
- UINT32 ProtocolVersion;\r
+ UINT32 ProtocolVersion;\r
///\r
/// Optional GUID used to identify a specific KMS. This GUID may be supplied by the provider,\r
/// by the implementation, or may be null. If is null, then the ServiceName must not be null.\r
///\r
- EFI_GUID ServiceId;\r
+ EFI_GUID ServiceId;\r
///\r
/// Optional pointer to a unicode string which may be used to identify the KMS or provide\r
/// other information about the supplier.\r
///\r
- CHAR16 *ServiceName;\r
+ CHAR16 *ServiceName;\r
///\r
/// Optional 32-bit value which may be used to indicate the version of the KMS provided by\r
/// the supplier.\r
///\r
- UINT32 ServiceVersion;\r
+ UINT32 ServiceVersion;\r
///\r
/// TRUE if and only if the service is active and available for use. To avoid unnecessary\r
/// delays in POST, this protocol may be installed without connecting to the service. In this\r
/// as defined in the reminder of this protocol are not guaranteed to be valid until the service\r
/// has been marked available.\r
///\r
- BOOLEAN ServiceAvailable;\r
+ BOOLEAN ServiceAvailable;\r
///\r
/// TRUE if and only if the service supports client identifiers. Client identifiers may be used\r
/// for auditing, access control or any other purpose specific to the implementation.\r
///\r
- BOOLEAN ClientIdSupported;\r
+ BOOLEAN ClientIdSupported;\r
///\r
/// TRUE if and only if the service requires a client identifier in order to process key requests.\r
/// FALSE otherwise.\r
///\r
- BOOLEAN ClientIdRequired;\r
+ BOOLEAN ClientIdRequired;\r
///\r
/// The maximum size in bytes for the client identifier.\r
///\r
- UINT16 ClientIdMaxSize;\r
+ UINT16 ClientIdMaxSize;\r
///\r
/// The client name string type(s) supported by the KMS service. If client names are not\r
/// supported, this field will be set the EFI_KMS_DATA_TYPE_NONE. Otherwise, it will be set\r
/// to the inclusive 'OR' of all client name formats supported. Client names may be used for\r
/// auditing, access control or any other purpose specific to the implementation.\r
///\r
- UINT8 ClientNameStringTypes;\r
+ UINT8 ClientNameStringTypes;\r
///\r
/// TRUE if only if the KMS requires a client name to be supplied to the service.\r
/// FALSE otherwise.\r
///\r
- BOOLEAN ClientNameRequired;\r
+ BOOLEAN ClientNameRequired;\r
///\r
/// The maximum number of characters allowed for the client name.\r
///\r
- UINT16 ClientNameMaxCount;\r
+ UINT16 ClientNameMaxCount;\r
///\r
/// TRUE if and only if the service supports arbitrary client data requests. The use of client\r
/// data requires the caller to have specific knowledge of the individual KMS service and\r
/// should be used only if absolutely necessary.\r
/// FALSE otherwise.\r
///\r
- BOOLEAN ClientDataSupported;\r
+ BOOLEAN ClientDataSupported;\r
///\r
/// The maximum size in bytes for the client data. If the maximum data size is not specified\r
/// by the KMS or it is not known, then this field must be filled with all ones.\r
///\r
- UINTN ClientDataMaxSize;\r
+ UINTN ClientDataMaxSize;\r
///\r
/// TRUE if variable length key identifiers are supported.\r
/// FALSE if a fixed length key identifier is supported.\r
///\r
- BOOLEAN KeyIdVariableLenSupported;\r
+ BOOLEAN KeyIdVariableLenSupported;\r
///\r
/// If KeyIdVariableLenSupported is TRUE, this is the maximum supported key identifier length\r
/// in bytes. Otherwise this is the fixed length of key identifier supported. Key ids shorter\r
/// than the fixed length will be padded on the right with blanks.\r
///\r
- UINTN KeyIdMaxSize;\r
+ UINTN KeyIdMaxSize;\r
///\r
/// The number of key format/size GUIDs returned in the KeyFormats field.\r
///\r
- UINTN KeyFormatsCount;\r
+ UINTN KeyFormatsCount;\r
///\r
/// A pointer to an array of EFI_GUID values which specify key formats/sizes supported by\r
/// this KMS. Each format/size pair will be specified by a separate EFI_GUID. At least one\r
/// using an arbitrary GUID, but any GUID not recognized by the implementation or not\r
/// supported by the KMS will return an error code of EFI_UNSUPPORTED\r
///\r
- EFI_GUID *KeyFormats;\r
+ EFI_GUID *KeyFormats;\r
///\r
/// TRUE if key attributes are supported.\r
/// FALSE if key attributes are not supported.\r
///\r
- BOOLEAN KeyAttributesSupported;\r
+ BOOLEAN KeyAttributesSupported;\r
///\r
/// The key attribute identifier string type(s) supported by the KMS service. If key attributes\r
/// are not supported, this field will be set to EFI_KMS_DATA_TYPE_NONE. Otherwise, it will\r
/// be set to the inclusive 'OR' of all key attribute identifier string types supported.\r
/// EFI_KMS_DATA_TYPE_BINARY is not valid for this field.\r
///\r
- UINT8 KeyAttributeIdStringTypes;\r
- UINT16 KeyAttributeIdMaxCount;\r
+ UINT8 KeyAttributeIdStringTypes;\r
+ UINT16 KeyAttributeIdMaxCount;\r
///\r
/// The number of predefined KeyAttributes structures returned in the KeyAttributes\r
/// parameter. If the KMS does not support predefined key attributes, or if it does not\r
/// provide a method to obtain predefined key attributes data, then this field must be zero.\r
///\r
- UINTN KeyAttributesCount;\r
+ UINTN KeyAttributesCount;\r
///\r
/// A pointer to an array of KeyAttributes structures which contains the predefined\r
/// attributes supported by this KMS. Each structure must contain a valid key attribute\r
/// does not distinguish between predefined and used defined attributes, and therefore,\r
/// predefined attributes not enumerated will still be processed to the KMS.\r
///\r
- EFI_KMS_KEY_ATTRIBUTE *KeyAttributes;\r
+ EFI_KMS_KEY_ATTRIBUTE *KeyAttributes;\r
};\r
\r
-extern EFI_GUID gEfiKmsFormatGeneric128Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric160Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric256Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric512Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric1024Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric2048Guid;\r
-extern EFI_GUID gEfiKmsFormatGeneric3072Guid;\r
-extern EFI_GUID gEfiKmsFormatMd2128Guid;\r
-extern EFI_GUID gEfiKmsFormatMdc2128Guid;\r
-extern EFI_GUID gEfiKmsFormatMd4128Guid;\r
-extern EFI_GUID gEfiKmsFormatMdc4128Guid;\r
-extern EFI_GUID gEfiKmsFormatMd5128Guid;\r
-extern EFI_GUID gEfiKmsFormatMd5sha128Guid;\r
-extern EFI_GUID gEfiKmsFormatSha1160Guid;\r
-extern EFI_GUID gEfiKmsFormatSha256256Guid;\r
-extern EFI_GUID gEfiKmsFormatSha512512Guid;\r
-extern EFI_GUID gEfiKmsFormatAesxts128Guid;\r
-extern EFI_GUID gEfiKmsFormatAesxts256Guid;\r
-extern EFI_GUID gEfiKmsFormatAescbc128Guid;\r
-extern EFI_GUID gEfiKmsFormatAescbc256Guid;\r
-extern EFI_GUID gEfiKmsFormatRsasha11024Guid;\r
-extern EFI_GUID gEfiKmsFormatRsasha12048Guid;\r
-extern EFI_GUID gEfiKmsFormatRsasha2562048Guid;\r
-extern EFI_GUID gEfiKmsFormatRsasha2563072Guid;\r
-extern EFI_GUID gEfiKmsProtocolGuid;\r
+extern EFI_GUID gEfiKmsFormatGeneric128Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric160Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric256Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric512Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric1024Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric2048Guid;\r
+extern EFI_GUID gEfiKmsFormatGeneric3072Guid;\r
+extern EFI_GUID gEfiKmsFormatMd2128Guid;\r
+extern EFI_GUID gEfiKmsFormatMdc2128Guid;\r
+extern EFI_GUID gEfiKmsFormatMd4128Guid;\r
+extern EFI_GUID gEfiKmsFormatMdc4128Guid;\r
+extern EFI_GUID gEfiKmsFormatMd5128Guid;\r
+extern EFI_GUID gEfiKmsFormatMd5sha128Guid;\r
+extern EFI_GUID gEfiKmsFormatSha1160Guid;\r
+extern EFI_GUID gEfiKmsFormatSha256256Guid;\r
+extern EFI_GUID gEfiKmsFormatSha512512Guid;\r
+extern EFI_GUID gEfiKmsFormatAesxts128Guid;\r
+extern EFI_GUID gEfiKmsFormatAesxts256Guid;\r
+extern EFI_GUID gEfiKmsFormatAescbc128Guid;\r
+extern EFI_GUID gEfiKmsFormatAescbc256Guid;\r
+extern EFI_GUID gEfiKmsFormatRsasha11024Guid;\r
+extern EFI_GUID gEfiKmsFormatRsasha12048Guid;\r
+extern EFI_GUID gEfiKmsFormatRsasha2562048Guid;\r
+extern EFI_GUID gEfiKmsFormatRsasha2563072Guid;\r
+extern EFI_GUID gEfiKmsProtocolGuid;\r
\r
#endif\r