cron2 has submitted this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email )

Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................

ssl_openssl: Use correct return type for RSA_size

It returns int, so use that. Avoids a sign-compare
warning.

Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Arne Schwabe <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg35890.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/ssl_openssl.c
1 file changed, 2 insertions(+), 12 deletions(-)




diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
index 095f893..840d9a0 100644
--- a/src/openvpn/ssl_openssl.c
+++ b/src/openvpn/ssl_openssl.c
@@ -1491,17 +1491,11 @@
     return len;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
 /* sign arbitrary data */
 static int
 rsa_priv_enc(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, 
int padding)
 {
-    unsigned int len = RSA_size(rsa);
-    int ret = -1;
+    int len = RSA_size(rsa);

     if (padding != RSA_PKCS1_PADDING && padding != RSA_NO_PADDING)
     {
@@ -1509,15 +1503,11 @@
         return -1;
     }

-    ret = get_sig_from_man(from, flen, to, len, get_rsa_padding_name(padding));
+    int ret = get_sig_from_man(from, flen, to, len, 
get_rsa_padding_name(padding));

     return (ret == len) ? ret : -1;
 }

-#if defined(__GNUC__) || defined(__clang__)
-#pragma GCC diagnostic pop
-#endif
-
 static int
 tls_ctx_use_external_rsa_key(struct tls_root_ctx *ctx, EVP_PKEY *pkey)
 {

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

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[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