# medcrypt::guardian::utilities::ProvisionFiles

## Overview

This is the storage for generating provision request files in [GenerateProvisionRequest()](/api-reference/api-reference/classes/classmedcrypt-guardian-guardian.md#step-3-run-generateprovisionrequest).

**Requirements:**

* **Input:**&#x20;
  * All `const char*` inputs should be set to the beginning of the loaded buffer.&#x20;
  * All `size_t` inputs should be set to the size of the data loaded in the buffer.
* **Output:**&#x20;
  * All `char*` outputs should be set to the beginning of an allocated buffer.&#x20;
  * All `size_t` outputs should be set to the size of the allocated buffer. After success, they will be set to the size of the data written.

**Usage:**&#x20;

* This structure is used with [GenerateProvisionRequest()](/api-reference/api-reference/classes/classmedcrypt-guardian-guardian.md#step-3-run-generateprovisionrequest) to generate provisioning files.
* See GetProvisionFilesFromPath() and DeleteProvisionFileBuffers() in FileHelpers.h for examples.

**Include:**

```cpp
#include <ProvisionFiles.h>
```

**Syntax:**

```cpp
struct medcrypt::guardian::utilities::ProvisionFiles;
```

### Structure members

**Input members:**

* **TrustStore:** Trust store file buffer
* **TrustStoreSize:** Trust store file buffer size
* **PrivateIdentity:** Private identity file buffer
* **PrivateIdentitySize:** Private identity file buffer size
* **CertifiedProfile:** Certified profile file buffer
* **CertifiedProfileSize:** Certified profile file buffer size
* **CertifiedCertificateRevocations:** Certificate revocations file buffer
* **CertifiedCertificateRevocationsSize:** Certificate revocations file buffer size

**Output members:**

* **ProvisionRequest:** Provision request file buffer
* **ProvisionRequestSize:** Provision request file buffer size
* **GeneratedPrivateIdentity:** Generated private identity file buffer
* **GeneratedPrivateIdentitySize:** Generated private identity file buffer size

### Member details

#### Input members:

#### TrustStore

* **Description:** Trust store file buffer.
* **Type:** `const char*`
* **Usage:** Input
* **Syntax:**

```cpp
const char * TrustStore;
```

#### TrustStoreSize

* **Description:** Trust store file buffer size.
* **Type:** `size_t`
* **Usage:** Input
* **Syntax:**

```cpp
size_t TrustStoreSize;
```

#### PrivateIdentity

* **Description:** Private identity file buffer.
* **Type:** `const char*`
* **Usage:** Input
* **Syntax:**

```cpp
const char * PrivateIdentity;
```

#### PrivateIdentitySize

* **Description:** Private identity file buffer size.
* **Type:** `size_t`
* **Usage:** Input
* **Syntax:**

```cpp
size_t PrivateIdentitySize;
```

#### CertifiedProfile

* **Description:** Certified profile file buffer.
* **Type:** `const char*`
* **Usage:** Input
* **Syntax:**

```cpp
const char * CertifiedProfile;
```

#### CertifiedProfileSize

* **Description:** Certified profile file buffer size.
* **Type:** `size_t`
* **Usage:** Input
* **Syntax:**

```cpp
size_t CertifiedProfileSize;
```

#### CertifiedCertificateRevocations

* **Description:** Certificate revocations file buffer.
* **Type:** `const char*`
* **Usage:** Input
* **Syntax:**

```cpp
const char * CertifiedCertificateRevocations;
```

#### CertifiedCertificateRevocationsSize

* **Description:** Certificate revocations file buffer size.
* **Type:** `size_t`
* **Usage:** Input
* **Syntax:**

```cpp
size_t CertifiedCertificateRevocationsSize;
```

#### Output members:

#### ProvisionRequest

* **Description:** Provision request file buffer.
* **Type:** `char*`
* **Usage:** Output
* **Syntax:**

```cpp
char * ProvisionRequest;
```

#### ProvisionRequestSize

* **Description:** Provision request file buffer size.&#x20;
  * **Input:** allocated buffer size.&#x20;
  * **Output:** actual data size written.
* **Type:** `size_t`
* **Usage:** Input/Output
* **Syntax:**

```cpp
size_t ProvisionRequestSize;
```

#### GeneratedPrivateIdentity

* **Description:** Generated private identity file buffer.
* **Type:** `char*`
* **Usage:** Output
* **Syntax:**

```cpp
char * GeneratedPrivateIdentity;
```

#### GeneratedPrivateIdentitySize

* **Description:** Generated private identity file buffer size.&#x20;
  * **Input:** allocated buffer size.&#x20;
  * **Output:** actual data size written.
* **Type:** `size_t`
* **Usage:** Input/Output
* **Syntax:**

```cpp
size_t GeneratedPrivateIdentitySize;
```

### Related classes

* [Guardian class](/api-reference/api-reference/classes/classmedcrypt-guardian-guardian.md#overview): Uses `ProvisionFiles` in [GenerateProvisionRequest()](/api-reference/api-reference/classes/classmedcrypt-guardian-guardian.md#step-3-run-generateprovisionrequest)
* [InitializeFiles struct](/api-reference/api-reference/classes/structmedcrypt-guardian-utilities-initializefiles.md) - Similar file structure used for initialization
* [ProvisionOnlineFiles struct](/api-reference/api-reference/classes/structmedcrypt-guardian-utilities-provisiononlinefiles.md) - File structure used for online provisioning

## Debugging and logging

Guardian does not create log files. Instead, logging is controlled by the application:

* Guardian logs to `stdout` and `stderr`, which appear in the terminal/CLI of the running application during execution. Look for specific error codes or connection failures in the output.
* **Custom logging:** Use `SetLoggingCallback` to redirect log messages to a callback function, stopping terminal output and allowing custom log handling
* **Log control:** Applications can control log level and verbosity.
* **Guardian Cloud UI**: Check the Guardian Cloud interface for additional error details and provisioning status.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.medcrypt.com/api-reference/api-reference/classes/structmedcrypt-guardian-utilities-provisionfiles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
