aboutsummaryrefslogtreecommitdiff
path: root/demos/cipher/aeskeywrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/cipher/aeskeywrap.c')
-rw-r--r--demos/cipher/aeskeywrap.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/demos/cipher/aeskeywrap.c b/demos/cipher/aeskeywrap.c
index f987772e4ffe..bf036074f30c 100644
--- a/demos/cipher/aeskeywrap.c
+++ b/demos/cipher/aeskeywrap.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2022-2024 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
@@ -50,10 +50,10 @@ static const unsigned char wrap_ct[] = {
* algorithm implementations. If they are NULL then the default library
* context and properties are used.
*/
-OSSL_LIB_CTX *libctx = NULL;
-const char *propq = NULL;
+static OSSL_LIB_CTX *libctx = NULL;
+static const char *propq = NULL;
-int aes_wrap_encrypt(void)
+static int aes_wrap_encrypt(void)
{
int ret = 0;
EVP_CIPHER_CTX *ctx;
@@ -111,7 +111,7 @@ err:
return ret;
}
-int aes_wrap_decrypt(void)
+static int aes_wrap_decrypt(void)
{
int ret = 0;
EVP_CIPHER_CTX *ctx;
@@ -171,11 +171,10 @@ err:
int main(int argc, char **argv)
{
if (!aes_wrap_encrypt())
- return 1;
+ return EXIT_FAILURE;
if (!aes_wrap_decrypt())
- return 1;
+ return EXIT_FAILURE;
- return 0;
+ return EXIT_SUCCESS;
}
-