Use this file to discover all available pages before exploring further.
In this section, we create a GitLab CI/CD pipeline that automatically builds Windows executables and submits them to CryptoHub for code signing. The pipeline uses a two-stage approach: compile the executable with MinGW in the build stage, then submit it for signing and poll for approval in the sign stage. This ensures signed artifacts are available for deployment without manual intervention.
Store sensitive credentials and connection details as protected CI/CD variables:
1
Go to your GitLab project.
2
Select Settings > CI/CD.
3
Expand Variables.
4
Add the following variables:
Variable name
Value
PKIP12B64
Base64-encoded PKCS#12 certificate
PKI_PASS
PKCS#12 certificate password
To encode your PKCS#12 certificate as Base64:
Bash
base64 -i pki.p12 | tr -d '\n' > pki.p12.b64
Copy the contents of client-cert.p12.b64 into the PKI_P12_B64 variable.Why mask and protect: Protected variables are only exposed to protected branches (e.g., main). Masked variables are hidden in job logs. Both settings prevent credential exposure.
TLS setup: Decodes the PKCS #12 certificate and configures CryptoHub connection
Request submission: Submits the executable for signing with a unique request name
Status polling: Polls request status every 10 seconds until it reaches a terminal state (signed, denied, deleted)
Signature download: Retrieves the signature for the executable when approval is complete. The Futurex CLI handles embedding the signature into the executable.
The GitLab service on the CryptoHub uses TLS authentication. This means authentication occurs automatically, immediately after the TLS negotiation, using the certificate itself rather than a username and password.
Configuration variables:
Variable
Default
Purpose
POLL_INTERVAL
10
Seconds between status checks
MAX_ATTEMPTS
0
Maximum polling attempts (0 = infinite)
CH_HOSTNAME
Must be defined. There is no default value.
CryptoHub server hostname
CH_PORT
Must be defined. There is no default value.
CryptoHub server port
Polling behavior:
pending: Job sleeps for POLL_INTERVAL seconds and checks status again
signed: Job downloads the signature, and Futurex CLI embeds it in the executable.
denied: Job fails immediately with exit code 2
deleted/unknown: Job fails immediately with exit code 3 (request was removed from CryptoHub)
MAX_ATTEMPTS reached: Job fails with exit code 124 (timeout)
Exit codes:
Exit code
Meaning
Action required
0
Success (signature downloaded)
None
2
Request denied by approver
Review denial reason in CryptoHub
3
Request deleted or unknown
Check CryptoHub logs; request may have been manually removed