Re: [Openvpn-devel] [PATCH for 2.4] Correct the return value of cryptoapi RSA signature callbacks

2019-07-28 Thread Steffan Karger



On 27-07-19 05:12, selva.n...@gmail.com wrote:
> From: Selva Nair 
> 
> Fixes the wrong check on siglen instead of *siglen for
> signing failures.
> 
> Bug reported by: lilulo 
> 
> Signed-off-by: Selva Nair 
> ---
>  src/openvpn/cryptoapi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/openvpn/cryptoapi.c b/src/openvpn/cryptoapi.c
> index 720fce09..35a9ebc4 100644
> --- a/src/openvpn/cryptoapi.c
> +++ b/src/openvpn/cryptoapi.c
> @@ -393,7 +393,7 @@ rsa_sign_CNG(int type, const unsigned char *m, unsigned 
> int m_len,
>  }
>  
>  *siglen = priv_enc_CNG(cd, alg, m, (int)m_len, sig, RSA_size(rsa), 
> padding);
> -return (siglen == 0) ? 0 : 1;
> +return (*siglen == 0) ? 0 : 1;
>  }
>  
>  /* decrypt */
> 

Acked-by: Steffan Karger 


___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [PATCH for 2.4] Correct the return value of cryptoapi RSA signature callbacks

2019-07-26 Thread selva . nair
From: Selva Nair 

Fixes the wrong check on siglen instead of *siglen for
signing failures.

Bug reported by: lilulo 

Signed-off-by: Selva Nair 
---
 src/openvpn/cryptoapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/openvpn/cryptoapi.c b/src/openvpn/cryptoapi.c
index 720fce09..35a9ebc4 100644
--- a/src/openvpn/cryptoapi.c
+++ b/src/openvpn/cryptoapi.c
@@ -393,7 +393,7 @@ rsa_sign_CNG(int type, const unsigned char *m, unsigned int 
m_len,
 }
 
 *siglen = priv_enc_CNG(cd, alg, m, (int)m_len, sig, RSA_size(rsa), 
padding);
-return (siglen == 0) ? 0 : 1;
+return (*siglen == 0) ? 0 : 1;
 }
 
 /* decrypt */
-- 
2.20.1



___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel