Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:18:46.832Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

sign.ps1

54 lines · 1.5 KB · text
1param (
2    [Parameter(Mandatory = $true)]
3    [string]$filePath
4)
5
6$params = @{}
7
8$endpoint = $ENV:ENDPOINT
9if ([string]::IsNullOrWhiteSpace($endpoint)) {
10    throw "The 'ENDPOINT' env is required."
11}
12$params["Endpoint"] = $endpoint
13
14$trustedSigningAccountName = $ENV:ACCOUNT_NAME
15if ([string]::IsNullOrWhiteSpace($trustedSigningAccountName)) {
16    throw "The 'ACCOUNT_NAME' env is required."
17}
18$params["CodeSigningAccountName"] = $trustedSigningAccountName
19
20$certificateProfileName = $ENV:CERT_PROFILE_NAME
21if ([string]::IsNullOrWhiteSpace($certificateProfileName)) {
22    throw "The 'CERT_PROFILE_NAME' env is required."
23}
24$params["CertificateProfileName"] = $certificateProfileName
25
26$fileDigest = $ENV:FILE_DIGEST
27if ([string]::IsNullOrWhiteSpace($fileDigest)) {
28    throw "The 'FILE_DIGEST' env is required."
29}
30$params["FileDigest"] = $fileDigest
31
32$timeStampDigest = $ENV:TIMESTAMP_DIGEST
33if ([string]::IsNullOrWhiteSpace($timeStampDigest)) {
34    throw "The 'TIMESTAMP_DIGEST' env is required."
35}
36$params["TimestampDigest"] = $timeStampDigest
37
38$timeStampServer = $ENV:TIMESTAMP_SERVER
39if ([string]::IsNullOrWhiteSpace($timeStampServer)) {
40    throw "The 'TIMESTAMP_SERVER' env is required."
41}
42$params["TimestampRfc3161"] = $timeStampServer
43
44$params["Files"] = $filePath
45
46$trace = $ENV:TRACE
47if (-Not [string]::IsNullOrWhiteSpace($trace)) {
48    if ([System.Convert]::ToBoolean($trace)) {
49        Set-PSDebug -Trace 2
50    }
51}
52
53Invoke-TrustedSigning @params
54
Served at tenant.openagents/omega Member data and write actions are omitted.