Gert Doering has submitted this change. ( 
https://gerrit.openvpn.net/c/openvpn/+/2007?usp=email )

Change subject: ssl_verify_mbedtls: Avoid conversion warning in 
x509_get_fingerprint
......................................................................

ssl_verify_mbedtls: Avoid conversion warning in x509_get_fingerprint

We already convert mbedtls_md_get_size to int in other
places, so just use that here as well.

Change-Id: Iae70a03c2bcc502f62133abcbfd1c92528e65d69
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Razvan Cojocaru <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2007
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg40020.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/ssl_verify_mbedtls.c
1 file changed, 1 insertion(+), 10 deletions(-)




diff --git a/src/openvpn/ssl_verify_mbedtls.c b/src/openvpn/ssl_verify_mbedtls.c
index b9a36a6..6680ccc 100644
--- a/src/openvpn/ssl_verify_mbedtls.c
+++ b/src/openvpn/ssl_verify_mbedtls.c
@@ -542,25 +542,16 @@
     return FAILURE;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
-#endif
-
 static struct buffer
 x509_get_fingerprint(const mbedtls_md_info_t *md_info, mbedtls_x509_crt *cert, 
struct gc_arena *gc)
 {
     const size_t md_size = mbedtls_md_get_size(md_info);
     struct buffer fingerprint = alloc_buf_gc(md_size, gc);
     mbedtls_md(md_info, cert->raw.p, cert->raw.len, BPTR(&fingerprint));
-    ASSERT(buf_inc_len(&fingerprint, md_size));
+    ASSERT(buf_inc_len(&fingerprint, (int)md_size));
     return fingerprint;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 struct buffer
 x509_get_sha1_fingerprint(mbedtls_x509_crt *cert, struct gc_arena *gc)
 {

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

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iae70a03c2bcc502f62133abcbfd1c92528e65d69
Gerrit-Change-Number: 2007
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Lichtenheld <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Răzvan Cojocaru <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to