Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an algorithm for setting the agent certificate serial number #293

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,26 @@ The [=agent certificate=] must have the following characteristics:
used to encode the identifiers.
* Valid for signing.

Let the <dfn>certificate serial number</dfn> be the result of the following steps:

<ol>
<li>If the agent has never generated an agent certificate:
<ol>
<li>Let the <dfn>certificate serial number base</dfn> be a 32-bit
pseudorandom integer value.</il>
<li>Let the <dfn>certificate serial number counter</dfn> be a 32-bit
unsigned integer.</li>
<li>Assign the [=certificate serial number counter=] to 0.</li>
markafoltz marked this conversation as resolved.
Show resolved Hide resolved
</ol>
</li>
<li>Generate a 64-bit value as follows:
<ol>
<li>Increment the [=certificate serial number counter=] by one.</li>
<li>Assign the upper 32 bits to the [=certificate serial number base=].</li>
<li>Assign the lower 32 bits to the [=certificate serial number counter=].</il>
</ol>
</ol>

The following X.509 v3 fields are to be set as follows:

<div class="assertion">
Expand All @@ -392,7 +412,7 @@ The following X.509 v3 fields are to be set as follows:
</tr>
<tr>
<td>Serial Number</td>
<td>`<fp>`</td>
<td>The [=certificate serial number=].</td>
</tr>
<tr>
<td>Public Key `AlgorithmIdentifier`</td>
Expand Down Expand Up @@ -442,8 +462,8 @@ The following X.509 v3 fields are to be set as follows:

Mandatory fields not mentioned above should be set according to [[!RFC5280]].

The value `<fp>` above should be substituted with the [=agent fingerprint=] (as
serialized in mDNS TXT).
The value `<sn>` above should be substituted with the [=certificate serial
number=].

Note: The OSP agent may use the implementer or device model name as the value
for the `O` key for user interface and debugging purposes. It may use the agent
Expand Down
Loading