[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Mon May 8 18:11:50 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  d5b139e497d90962abd51a2f4354c7cae6d1c64d (commit)
      from  735c6269775ee44459227b4fade67a3f35e98cab (commit)


- Log -----------------------------------------------------------------
commit d5b139e497d90962abd51a2f4354c7cae6d1c64d
Author: Meena Vyas <meena.vyas at oracle.com>
Date:   Mon May 8 23:23:01 2017 +1000

    Added a new Makefile in demos/evp directory
    Fixed compilation warning in file aesgcm.c
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3406)
    (cherry picked from commit d396da33130aba2e77478d00fd369eb8d34bd8bf)

-----------------------------------------------------------------------

Summary of changes:
 demos/evp/Makefile | 20 ++++++++++++++++++++
 demos/evp/aesgcm.c |  3 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 demos/evp/Makefile

diff --git a/demos/evp/Makefile b/demos/evp/Makefile
new file mode 100644
index 0000000..72c6e81
--- /dev/null
+++ b/demos/evp/Makefile
@@ -0,0 +1,20 @@
+# Quick instruction:
+# To build against an OpenSSL built in the source tree, do this:
+#
+#    make OPENSSL_INCS_LOCATION=-I../../include OPENSSL_LIBS_LOCATION=-L../..
+#
+# To run the demos when linked with a shared library (default):
+#
+#    LD_LIBRARY_PATH=../.. ./aesccm
+#    LD_LIBRARY_PATH=../.. ./aesgcm
+
+CFLAGS = $(OPENSSL_INCS_LOCATION)
+LDFLAGS = $(OPENSSL_LIBS_LOCATION) -lssl -lcrypto
+
+all: aesccm aesgcm 
+
+aesccm: aesccm.o
+aesgcm: aesgcm.o
+
+aesccm aesgcm:
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
diff --git a/demos/evp/aesgcm.c b/demos/evp/aesgcm.c
index 17b0ef4..df59f46 100644
--- a/demos/evp/aesgcm.c
+++ b/demos/evp/aesgcm.c
@@ -102,7 +102,8 @@ void aes_gcm_decrypt(void)
     printf("Plaintext:\n");
     BIO_dump_fp(stdout, outbuf, outlen);
     /* Set expected tag value. */
-    EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(gcm_tag), gcm_tag);
+    EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(gcm_tag), 
+                        (void *)gcm_tag);
     /* Finalise: note get no output for GCM */
     rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen);
     /*


More information about the openssl-commits mailing list