Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2391?usp=email

to review the following change.


Change subject: test_pkcs11: Avoid sign conversion warnings with OpenSSL forks
......................................................................

test_pkcs11: Avoid sign conversion warnings with OpenSSL forks

- Use openssl_err_t. For printf just use a big type that should
  cover all the variants instead of adding a dedicated format
  define.
- Cast return value of EVP_MD_size like we do everwhere else
  already.

Change-Id: Id7bb50f7cdced3a73b930b124381405e59dbfbad
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M tests/unit_tests/openvpn/test_pkcs11.c
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/91/2391/1

diff --git a/tests/unit_tests/openvpn/test_pkcs11.c 
b/tests/unit_tests/openvpn/test_pkcs11.c
index 3351eac..c6b02807 100644
--- a/tests/unit_tests/openvpn/test_pkcs11.c
+++ b/tests/unit_tests/openvpn/test_pkcs11.c
@@ -33,6 +33,7 @@
 #include "cert_data.h"
 #include "pkcs11.h"
 #include "ssl.h"
+#include "openssl_compat.h"

 #include <setjmp.h>
 #include <cmocka.h>
@@ -50,10 +51,10 @@
 void
 crypto_print_openssl_errors(const unsigned int flags)
 {
-    unsigned long e;
+    openssl_err_t e;
     while ((e = ERR_get_error()))
     {
-        msg(flags, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL));
+        msg(flags, "OpenSSL error %zu: %s", (size_t)e, ERR_error_string(e, 
NULL));
     }
 }
 #endif
@@ -183,7 +184,7 @@
 static void
 sha1_fingerprint(X509 *x509, uint8_t *hash, int capacity)
 {
-    assert_true(capacity >= EVP_MD_size(EVP_sha1()));
+    assert_true(capacity >= (int)EVP_MD_size(EVP_sha1()));
     assert_int_equal(X509_digest(x509, EVP_sha1(), hash, NULL), 1);
 }


--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2391?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7bb50f7cdced3a73b930b124381405e59dbfbad
Gerrit-Change-Number: 2391
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to