[Git][NTPsec/ntpsec][master] 2 commits: libaes_siv: pull a change from upstream and reformat.

James Browning (@jamesb_fe80) gitlab at mg.gitlab.com
Thu Feb 17 17:54:49 UTC 2022



James Browning pushed to branch master at NTPsec / ntpsec


Commits:
a7a77c25 by JamesB192 at 2022-02-17T14:24:19+00:00
libaes_siv: pull a change from upstream and reformat.


- - - - -
680c8520 by James Browning at 2022-02-17T14:24:19+00:00
aes_siv: Add test -- solves #557

- - - - -


4 changed files:

- libaes_siv/External-Version.txt
- libaes_siv/aes_siv.c
- libaes_siv/tests.c
- libaes_siv/wscript


Changes:

=====================================
libaes_siv/External-Version.txt
=====================================
@@ -1,4 +1,4 @@
 Upstream Source: https://github.com/dfoxfranke/libaes_siv
 Description: An RFC5297-compliant C implementation of AES-SIV
-Synchronised on: 2020-05-24
-Synchronised at: 509550e92a416172b9b8255e275f3a04d5fd4545
+Synchronised on: 2021-02-11
+Synchronised at: 9681279cfaa6e6399bb7ca3afbbc27fc2e19df4b


=====================================
libaes_siv/aes_siv.c
=====================================
@@ -247,12 +247,12 @@ void AES_SIV_CTX_free(AES_SIV_CTX *ctx) {
                         CMAC_CTX_free(ctx->cmac_ctx);
                 }
 		OPENSSL_cleanse(&ctx->d, sizeof ctx->d);
-                free(ctx);
+                OPENSSL_free(ctx);
         }
 }
 
 AES_SIV_CTX *AES_SIV_CTX_new(void) {
-        AES_SIV_CTX *ctx = malloc(sizeof(struct AES_SIV_CTX_st));
+        AES_SIV_CTX *ctx = OPENSSL_malloc(sizeof(struct AES_SIV_CTX_st));
         if (UNLIKELY(ctx == NULL)) {
                 return NULL;
         }


=====================================
libaes_siv/tests.c
=====================================
@@ -24,11 +24,11 @@ static void debug(const char *label, const unsigned char *hex, size_t len) {
         for (i = 0; i < len; i++) {
                 if (i > 0 && i % 16 == 0) {
                         printf("\n                  ");
-}
+                }
                 printf("%.2x", (int)hex[i]);
                 if (i > 0 && i % 4 == 3) {
                         printf(" ");
-}
+                }
         }
         printf("\n");
 }


=====================================
libaes_siv/wscript
=====================================
@@ -1,17 +1,32 @@
 def build(ctx):
+    aes_cflags=['-Wno-shadow',
+            # '-Wall', '-Wextra', '-Wstrict-prototypes',  # default
+            '-Wconversion',
+            '-O3',
+            '-fomit-frame-pointer',
+            '-funroll-loops',
+            '-ftree-vectorize',
+            '-Wno-inline',  # gcc 10 gives inline warnings?
+            ]
+
+
     ctx(
         target='aes_siv',
         features='c cstlib',
         includes=[ctx.bldnode.parent.abspath()],
         source='aes_siv.c',
         use='CRYPTO',
-        cflags=['-Wno-shadow',
-                # '-Wall', '-Wextra', '-Wstrict-prototypes',  # default
-                '-Wconversion',
-                '-O3',
-                '-fomit-frame-pointer',
-                '-funroll-loops',
-                '-ftree-vectorize',
-                '-Wno-inline',  # gcc 10 gives inline warnings?
-                ],
+        cflags=aes_cflags,
+    )
+
+    ctx(
+        target="runtests",
+        features="c cprogram test",
+        includes=[ctx.bldnode.parent.abspath()],
+        source=[
+            "aes_siv_test.c",
+            "tests.c",
+        ],
+        use="aes_siv",
+        cflags=aes_cflags,
     )



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/d67df8b09dc726c0a1fd86f2a4b2bd6f0042b3dc...680c8520ba37ae070c6e74ec7fe3ebe14345691d

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/d67df8b09dc726c0a1fd86f2a4b2bd6f0042b3dc...680c8520ba37ae070c6e74ec7fe3ebe14345691d
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20220217/d03ef98d/attachment-0001.htm>


More information about the vc mailing list