mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 17:22:07 +00:00
21aeed4f4e
Phase 0 closure (Path B2, post-rewrite):
addlicense sweep — adds the canonical certctl LLC copyright + BUSL-1.1
SPDX header to every production Go file. Template:
// Copyright 2026 certctl LLC. All rights reserved.
// SPDX-License-Identifier: BUSL-1.1
Coverage: 338 / 338 production Go files (cmd/ + internal/, excluding
*_test.go and **/testdata/**). Pre-sweep coverage was 22 / 338 (6.5%);
post-sweep is 338 / 338 (100%).
Normalized 22 pre-existing legacy headers (`// Copyright (c) certctl`
+ `// SPDX-License-Identifier: BSL-1.1`) and 1 file using a
`Certctl Contributors` attribution. The legacy SPDX ID `BSL-1.1`
is non-standard; the official SPDX identifier for Business Source
License 1.1 is `BUSL-1.1` (capital U). All 338 files now share the
canonical form.
Generated via:
addlicense -c "certctl LLC" -y 2026 \
-f cowork/legal/copyright-header.tpl \
-ignore '**/testdata/**' -ignore '**/*_test.go' \
cmd/ internal/
Verification:
find cmd internal -name '*.go' -not -name '*_test.go' \
-not -path '*/testdata/*' \
-exec grep -L '^// Copyright 2026 certctl LLC' {} \; | wc -l
Returns: 0
gofmt clean. Header additions are comments only, no compile impact.
Closes: cowork/certctl-architecture-diligence-audit.html#fix-RED-4
41 lines
1.7 KiB
Go
41 lines
1.7 KiB
Go
// Copyright 2026 certctl LLC. All rights reserved.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package domain
|
|
|
|
import "time"
|
|
|
|
// VerificationStatus represents the status of certificate deployment verification.
|
|
type VerificationStatus string
|
|
|
|
const (
|
|
// VerificationPending: verification has not yet been performed.
|
|
VerificationPending VerificationStatus = "pending"
|
|
// VerificationSuccess: the live TLS endpoint serves the expected certificate.
|
|
VerificationSuccess VerificationStatus = "success"
|
|
// VerificationFailed: the live TLS endpoint does not serve the expected certificate.
|
|
VerificationFailed VerificationStatus = "failed"
|
|
// VerificationSkipped: verification was skipped (disabled or not applicable).
|
|
VerificationSkipped VerificationStatus = "skipped"
|
|
)
|
|
|
|
// VerificationResult represents the outcome of verifying a deployed certificate
|
|
// against the live TLS endpoint it should be serving.
|
|
type VerificationResult struct {
|
|
// JobID is the ID of the deployment job being verified.
|
|
JobID string `json:"job_id"`
|
|
// TargetID is the ID of the deployment target.
|
|
TargetID string `json:"target_id"`
|
|
// ExpectedFingerprint is the SHA-256 fingerprint of the certificate that was deployed.
|
|
ExpectedFingerprint string `json:"expected_fingerprint"`
|
|
// ActualFingerprint is the SHA-256 fingerprint of the certificate currently being served
|
|
// at the live TLS endpoint.
|
|
ActualFingerprint string `json:"actual_fingerprint"`
|
|
// Verified is true if expected and actual fingerprints match.
|
|
Verified bool `json:"verified"`
|
|
// VerifiedAt is the timestamp when verification was performed.
|
|
VerifiedAt time.Time `json:"verified_at"`
|
|
// Error is a non-empty error message if verification failed to complete.
|
|
Error string `json:"error,omitempty"`
|
|
}
|