provisioning_sc_attestation_mechanism.h

Includes

#include <stdbool.h>
#include "umock_c/umock_c_prod.h"
#include "azure_macro_utils/macro_utils.h"
#include "provisioning_sc_tpm_attestation.h"
#include "provisioning_sc_x509_attestation.h"
#include "parson.h"

Detailed Description

Functions

Function Name Description
ATTESTATION_TYPEStrings
ATTESTATION_TYPE_FromString
attestationMechanism_createWithTpm Creates an Attestation Mechanism handle that uses a TPM Attestation for use in consequent APIs.
attestationMechanism_createWithX509ClientCert Creates an Attestation Mechanism handle that uses an x509 Attestation with client certificate(s) for use in consequent APIs. Please note that an x509 Attestation with a client certificate is NOT VALID when attached to an enrollment group.
attestationMechanism_createWithX509SigningCert Creates an Attestation Mechanism handle that uses an x509 Attestation with signing certificate(s) for use in consequent APIs. Please note that an x509 Attestation with a signing certificate is NOT VALID when attached to an individual enrollment.
attestationMechanism_createWithX509CAReference Creates an Attestation Mechanism handle that uses an x509 Attestation with CA Certificate Reference(s) for use in consequent APIs. Please note that an x509 Attestation with a CA Certificate Reference is NOT VALID when attached to an Individual Enrollment.
attestationMechanism_destroy Destroys an Attestation Mechanism handle, freeing all allocated memory. Please note that this also includes any memory in more specific handles generated from the handle (e.g. TPM_ATTESTATION_HANDLE). Please note further that this will also cause any Enrollment that the Attestation Mechanism has been attached to to have unexpected behvaiours. Do not use this function unless the attestation mechanism is unattached.
attestationMechanism_isValidForIndividualEnrollment Returns result indicating if an attestation mechanism is valid to be attached to an Individual Enrollment.
attestationMechanism_isValidForEnrollmentGroup Returns result indicating if an attestation mechanism is valid to be attached to an Enrollment Group.
attestationMechanism_getType
attestationMechanism_getTpmAttestation
attestationMechanism_getX509Attestation

Macro definitions

ATTESTATION_TYPE_VALUES

#define ATTESTATION_TYPE_VALUES \
        ATTESTATION_TYPE_NONE, \
        ATTESTATION_TYPE_TPM, \
        ATTESTATION_TYPE_X509 

Enumeration types

ATTESTATION_TYPE

enum ATTESTATION_TYPE {
  ATTESTATION_TYPE_NONE,
  ATTESTATION_TYPE_TPM,
  ATTESTATION_TYPE_X509
}

Type definitions

ATTESTATION_MECHANISM_HANDLE

typedef struct ATTESTATION_MECHANISM_TAG* ATTESTATION_MECHANISM_HANDLE;