pub struct ReleaseCredential {
pub private_key_hex: String,
pub public_key_hex: String,
pub cert_hex: String,
pub version: String,
}Expand description
Everything a release build needs to sign requests: the per-version private key, its public key, the master-issued certificate over that public key, and the version the certificate is bound to.
CI produces these per release via issue_release_credential and
bakes them into the build (the private key as a compile-time secret;
the public key and cert are not sensitive). Construct one from those
baked strings and hand it to crate::Client::post_public_signed_json.
Fields§
§private_key_hex: String64-char hex of the 32-byte per-version Ed25519 private (seed) key.
public_key_hex: String64-char hex of the 32-byte per-version Ed25519 public key.
cert_hex: String128-char hex of the 64-byte master signature over
cert_payload(version, public_key).
version: StringThe build version the certificate is bound to. Must match what the
platform sees; the signer sends it in [HEADER_BUILD_VERSION].
Implementations§
Source§impl ReleaseCredential
impl ReleaseCredential
Sourcepub fn sign_request(
&self,
method: &str,
path: &str,
body: &[u8],
) -> Result<RequestSignature>
pub fn sign_request( &self, method: &str, path: &str, body: &[u8], ) -> Result<RequestSignature>
Sign a request’s canonical string with the per-version key,
producing the timestamp/nonce/signature to send. body is the
exact bytes that will be sent as the request body; method is the
upper-case HTTP verb and path the request path (no host, no
query). [Client::post_public_signed_json] wraps this for the
common JSON-POST case.
Trait Implementations§
Source§impl Clone for ReleaseCredential
impl Clone for ReleaseCredential
Source§fn clone(&self) -> ReleaseCredential
fn clone(&self) -> ReleaseCredential
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more