loadPrivateKey¶
Canonical path: o6.util.loadPrivateKey
loadPrivateKey
¶
Load a DER- or PEM-encoded private key from path.
The bytes are passed through unchanged, so the format is whatever the file holds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
File to read. |
required |
Returns:
| Type | Description |
|---|---|
bytes
|
The raw private-key bytes. |
Raises:
| Type | Description |
|---|---|
OSError
|
The file cannot be read. |