aboutsummaryrefslogtreecommitdiff
path: root/demos/kdf/pbkdf2.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/kdf/pbkdf2.c')
-rw-r--r--demos/kdf/pbkdf2.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/demos/kdf/pbkdf2.c b/demos/kdf/pbkdf2.c
index 3e0adaee795f..28a075513c25 100644
--- a/demos/kdf/pbkdf2.c
+++ b/demos/kdf/pbkdf2.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -35,7 +35,7 @@ static unsigned char password[] = {
static unsigned char pbkdf2_salt[] = {
'N', 'a', 'C', 'l'
};
-
+
/*
* The iteration parameter can be variable or hard coded. The disadvantage with
* hard coding them is that they cannot easily be adjusted for future
@@ -57,7 +57,7 @@ static const unsigned char expected_output[] = {
int main(int argc, char **argv)
{
- int rv = 1;
+ int ret = EXIT_FAILURE;
EVP_KDF *kdf = NULL;
EVP_KDF_CTX *kctx = NULL;
unsigned char out[64];
@@ -108,10 +108,12 @@ int main(int argc, char **argv)
goto end;
}
- rv = 0;
+ printf("Success\n");
+
+ ret = EXIT_SUCCESS;
end:
EVP_KDF_CTX_free(kctx);
EVP_KDF_free(kdf);
OSSL_LIB_CTX_free(library_context);
- return rv;
+ return ret;
}