summaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-08 20:32:16 +0200
committerJakob Unterwurzacher2021-09-08 20:32:16 +0200
commit94e8004b6ce497dafd13e8c3f6f6596b49169970 (patch)
treed5b2412ce9e52429f2b1cd74ad60abca0ea7f3bc /cli_args.go
parent1a5866729387c09eca1cdc9737d1b02c74c25901 (diff)
Make -openssl also apply to xchacha
Now that stupidgcm supports xchacha, make it available on mount.
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli_args.go b/cli_args.go
index 7175006..d666b47 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -253,7 +253,11 @@ func parseCliOpts(osArgs []string) (args argContainer) {
}
// "-openssl" needs some post-processing
if opensslAuto == "auto" {
- args.openssl = stupidgcm.PreferOpenSSLAES256GCM()
+ if args.xchacha {
+ args.openssl = stupidgcm.PreferOpenSSLXchacha20poly1305()
+ } else {
+ args.openssl = stupidgcm.PreferOpenSSLAES256GCM()
+ }
} else {
args.openssl, err = strconv.ParseBool(opensslAuto)
if err != nil {