Skip to content

Commit

Permalink
xxx: fix missing alg
Browse files Browse the repository at this point in the history
Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn committed Feb 3, 2025
1 parent d04b83f commit c098ac8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rbd/encryption_load2.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func (opts EncryptionOptionsLUKS1) writeEncryptionSpec(spec *C.rbd_encryption_sp
cPassphrase := (*C.char)(C.CBytes(opts.Passphrase))
cOptsSize := C.size_t(C.sizeof_rbd_encryption_luks1_format_options_t)
cOpts := (*C.rbd_encryption_luks1_format_options_t)(C.malloc(cOptsSize))
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
cOpts.passphrase = cPassphrase
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))

Expand All @@ -41,6 +42,7 @@ func (opts EncryptionOptionsLUKS2) writeEncryptionSpec(spec *C.rbd_encryption_sp
cPassphrase := (*C.char)(C.CBytes(opts.Passphrase))
cOptsSize := C.size_t(C.sizeof_rbd_encryption_luks2_format_options_t)
cOpts := (*C.rbd_encryption_luks2_format_options_t)(C.malloc(cOptsSize))
cOpts.alg = C.rbd_encryption_algorithm_t(opts.Alg)
cOpts.passphrase = cPassphrase
cOpts.passphrase_size = C.size_t(len(opts.Passphrase))

Expand Down

0 comments on commit c098ac8

Please sign in to comment.