tech.pisoft.teadmin.CodeSigningInfo
The CodeSigningInfo class manages code signing.
Since: 6.8.0
© Pi Soft, 2018-2026 · Tricryption Engine 8.1
Inheritance
- Inherits tech.pisoft.teadmin.UpdatableObject
Static Public Attributes
| Type | Name | Description |
|---|---|---|
| final int | PUBLISHER | codedigest_required value of an approved PUBLISHER row: the codename is a label and the row carries no digest. |
| final int | RELEASE | codedigest_required value of an approved RELEASE row: the codename is the artifact id and the digest is the 32-byte SHA-256 of the release manifest. |
Public Member Functions
| Member | Description |
|---|---|
CodeSigningInfo() | Default constructor. |
CodeSigningInfo(long id) | |
CodeSigningInfo(String label, File signing_cert) | Constructs an approved PUBLISHER row: a signer whose signature over a release manifest admits a client build at level 1. |
CodeSigningInfo(ReleaseManifest manifest, File signing_cert) | Constructs an approved RELEASE row: one exact signed release, which admits a client build at level 2. |
CodeSigningInfo(File jar, byte[] signing_cert) | Constructs a CodeSigningInfo whose code name is a file's name and whose digest is the SHA-256 of its content, with the certificate taken as raw bytes and never parsed. |
long getCodeSigningInfoID() | |
String getCodeName() | |
byte[] getSigningCertificate() | |
byte[] getDigest() | |
boolean isDigestRequired() | |
String toString() | Convert operation class into a string. |
Protected Member Functions
| Member | Description |
|---|---|
void getParameters(TreeMap param) | |
void putParameters(TreeMap param) |
Member Function Documentation
CodeSigningInfo()
Default constructor.
CodeSigningInfo(String label, File signing_cert)
Constructs an approved PUBLISHER row: a signer whose signature over a release manifest admits a client build at level 1.
Parameters
| Parameter | Description |
|---|---|
label | A label for the publisher; the Key Service stores it as the code name. |
signing_cert | The publisher's code-signing certificate, read from file (PEM or DER). |
Exceptions
| Exception | Description |
|---|---|
AdminException | if the certificate cannot be loaded. |
CodeSigningInfo(ReleaseManifest manifest, File signing_cert)
Constructs an approved RELEASE row: one exact signed release, which admits a client build at level 2.
Parameters
| Parameter | Description |
|---|---|
manifest | The release manifest; its artifact id becomes the code name and the SHA-256 of its exact bytes the digest. |
signing_cert | The signer's certificate, read from file (PEM or DER). The signer must also be registered as an approved publisher. |
Exceptions
| Exception | Description |
|---|---|
AdminException | if the certificate cannot be loaded. |
CodeSigningInfo(File jar, byte[] signing_cert)
Constructs a CodeSigningInfo whose code name is a file's name and whose digest is the SHA-256 of its content, with the certificate taken as raw bytes and never parsed.
The row kind is PUBLISHER, so the Key Service discards the digest on registration.
Parameters
| Parameter | Description |
|---|---|
jar | The file to name and digest. |
signing_cert | The certificate, raw bytes. |
Exceptions
| Exception | Description |
|---|---|
AdminException | if the file cannot be read or its SHA-256 digest cannot be computed. |
String toString()
Convert operation class into a string.
Returns: string of operation class