> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/api-and-command-reference/scra-dynafamily-programmers-manual/commands/security-command-group-0xennn/generate-csr-wlan-only-command-0xef03.md).

# Generate CSR (WLAN Only) - Command 0xEF03

The host uses this command to generate a certificate signing request (CSR) in PEM format. The CSR generated will be saved to volatile memory in the device and will overwrite any existing CSR. The CSR will persist in volatile memory until it is overwritten, fetched with **Start Get File from Device - Command 0xD821** or the device is power cycled or reset.

The sequence of events is as follows:

{% stepper %}
{% step %}

### Generate CSR — Step

The host will use **Generate CSR keys (WLAN Only) - Command 0xEF02** if it wants generate a CSR using a new CSR key pair.
{% endstep %}

{% step %}

### Construct and send request

The host constructs the command request in the format below and sends it to the device.
{% endstep %}

{% step %}

### Device response

The device sends a response in the format below to the host to indicate that CSR generation has completed.
{% endstep %}

{% step %}

### Fetch CSR

The host fetches the CSR with **Start Get File from Device - Command 0xD821.**
{% endstep %}

{% step %}

### Create certificate

The CSR is used to create a certificate.
{% endstep %}

{% step %}

### Load certificate into device

The host loads the certificate into the device with **Start Send File to Device (Secured) - Command 0xD811**.
{% endstep %}
{% endstepper %}

## Table GCW-1 - Request Data for Command 0xEF03 – Generate CSR (WLAN Only)

<table><thead><tr><th>Tag</th><th width="72.66668701171875">Len</th><th width="272.33331298828125">Value / Description</th><th width="76.66668701171875">Typ</th><th width="73.99993896484375">Req</th><th width="96.666748046875">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Request Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>EF03 = <strong>Generate CSR (WLAN Only) - Command 0xEF03</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>1</td><td><p>Key Identifier The key identifier to use to generate the CSR. The key pair associated with the identifier must already be present in the device for the command to succeed. </p><p>0 = CSR keys </p><p>1 = Apollo server cert keys </p><p>2 = Customer server cert keys </p><p>3 = Commercial server cert keys <br>4 = Apollo client cert keys</p></td><td>B</td><td>O</td><td>0</td></tr><tr><td>82</td><td>var</td><td><p>Subject </p><p>Including this optional parameter will override the default subject. This parameter should contain a null terminated string. This string should contain a list of attributes separated bycommas. If an attribute’s value contains a comma, the comma should be replaced with “\,” Each attribute value should be prefixed with its attribute name followed by “=”. The following is a list of valid attribute names. </p><p></p><p>"CN"<br>"commonName"<br>"C"<br>"countryName”<br>"O"<br>"organizationName"<br>“L”<br>“locality”<br>"R"<br>“OU”<br>"organizationalUnitName"<br>“ST”<br>"stateOrProvinceName"<br>"emailAddress"<br>"serialNumber"<br>“postalAddress”<br>"postalCode"<br>“dnQualifier”<br>"title"<br>“surname”<br>"SN"<br>“givenName”<br>"GN"<br>“initials”<br>"pseudonym"<br>"generationQualifier"<br>“domainComponent” "DC"<br>“O=MagTek Inc,CN= test1.com” is an example with two attributes.</p></td><td></td><td></td><td>“serialNum ber=XXXX XXX,CN= df- xxxxxxx” where XXXXXX X is <strong>Property 2.2.1.1.1.1****Serial Number</strong> and so is xxxxxxx but in lower case</td></tr><tr><td>83</td><td>var</td><td><p>Subject Alternative Names</p><p>Including this optional parameter will override the default subject alternative names. This parameter should contain a null terminated string. Only DNS names and IP addresses are supported and only a maximum of two each. DNS names must be prefixed with “DNS=” and IP addresses must be prefixed with “IPA=”. All Subject Alternative Names</p><p>Must be separated with a comma and not spaces. Subject Alternative Names may not be ordered in the CSR the same as they are ordered here.</p><p> </p><p>"DNS=test1.com,DNS=test2.,IPA=1.10.16.255,IPA=2.10.16.25</p><p>4" is an example.</p></td><td>B</td><td>O</td><td><p>“DNS=df-</p><p>xxxxxxx,IP A=192.168</p><p>.0.1<em>”</em> where xxxxxxx is Property 2.2.1.1.1.1</p><p>Serial Number but in lower case</p></td></tr><tr><td>End of any wrappers, at minimum including Request Message</td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table GCW-2 - Response Data for Command 0xEF03 – Generate CSR (WLAN Only)

<table><thead><tr><th width="225.6666259765625">Tag</th><th width="75.33331298828125">Len</th><th width="250.33331298828125">Value / Description</th><th width="78">Typ</th><th width="76">Req</th><th width="96">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>EF03 = <strong>Generate CSR (WLAN Only) - Command 0xEF03</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table GCW-3 - Request Example

{% code title="Example (hex)" %}

```
AA00 81 04 0155EF03 84 02 EF03
```

{% endcode %}

## Table GCW-4 - Response Example

{% code title="Example (hex)" %}

```
AA00 81 04 8255EF03 82 04 00000000 84 02 EF03
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developer.magtek.com/api-and-command-reference/scra-dynafamily-programmers-manual/commands/security-command-group-0xennn/generate-csr-wlan-only-command-0xef03.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
