Skip to content

Commit 8ff94e1

Browse files
committed
C-WCOW: Update pkg/ociwclayer/cim/import.go comment
Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
1 parent 1bc329d commit 8ff94e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/gcs-sidecar/handlers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package bridge
55

66
import (
7-
"encoding/base64"
7+
"encoding/hex"
88
"encoding/json"
99
"fmt"
1010
"os"
@@ -624,7 +624,7 @@ func (b *Bridge) modifySettings(req *request) (err error) {
624624
return fmt.Errorf("failed to get CIM verification info: %w", err)
625625
}
626626
layerDigests[i] = cimRootDigestBytes
627-
layerHashes[i] = base64.URLEncoding.EncodeToString(cimRootDigestBytes)
627+
layerHashes[i] = hex.EncodeToString(cimRootDigestBytes)
628628
layerCIMs = append(layerCIMs, &layerCim)
629629

630630
log.G(ctx).Debugf("block CIM layer digest %s, path: %s\n", layerHashes[i], physicalDevPath)

pkg/ociwclayer/cim/import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func WithParentLayers(parentLayers []*cimfs.BlockCIM) BlockCIMLayerImportOpt {
9999
func writeIntegrityChecksumInfoFile(ctx context.Context, blockPath string) error {
100100
log.G(ctx).Debugf("writing integrity checksum file for block CIM `%s`", blockPath)
101101
// for convenience write a file that has the hex encoded root digest of the generated verified CIM.
102-
// this same base64 string can be used in the confidential policy.
102+
// this same hex string can be used in the confidential policy.
103103
digest, err := cimfs.GetVerificationInfo(blockPath)
104104
if err != nil {
105105
return fmt.Errorf("failed to query verified info of the CIM layer: %w", err)

0 commit comments

Comments
 (0)