about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/crypto.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/crypto.cc')
-rw-r--r--third_party/nix/src/libstore/crypto.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/crypto.cc b/third_party/nix/src/libstore/crypto.cc
index 7a169107c116..f26cabdf6dc7 100644
--- a/third_party/nix/src/libstore/crypto.cc
+++ b/third_party/nix/src/libstore/crypto.cc
@@ -32,8 +32,9 @@ Key::Key(const string& s) {
 
 SecretKey::SecretKey(const string& s) : Key(s) {
 #if HAVE_SODIUM
-  if (key.size() != crypto_sign_SECRETKEYBYTES)
+  if (key.size() != crypto_sign_SECRETKEYBYTES) {
     throw Error("secret key is not valid");
+  }
 #endif
 }
 
@@ -69,8 +70,9 @@ PublicKey SecretKey::toPublicKey() const {
 
 PublicKey::PublicKey(const string& s) : Key(s) {
 #if HAVE_SODIUM
-  if (key.size() != crypto_sign_PUBLICKEYBYTES)
+  if (key.size() != crypto_sign_PUBLICKEYBYTES) {
     throw Error("public key is not valid");
+  }
 #endif
 }