Juan Lang : rsaenh: Only reverse the significant bytes of an exported public key.

Alexandre Julliard julliard at winehq.org
Mon Nov 9 15:14:13 CST 2009


Module: wine
Branch: master
Commit: 27027590f8af0a5b20b43a8491a082174201efe3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=27027590f8af0a5b20b43a8491a082174201efe3

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Nov  5 10:02:57 2009 -0800

rsaenh: Only reverse the significant bytes of an exported public key.

---

 dlls/rsaenh/implglue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/rsaenh/implglue.c b/dlls/rsaenh/implglue.c
index a36d7e7..b73eba9 100644
--- a/dlls/rsaenh/implglue.c
+++ b/dlls/rsaenh/implglue.c
@@ -361,7 +361,7 @@ BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen)
 BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,DWORD *pdwPubExp)
 {
     mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest);
-    reverse_bytes(pbDest, dwKeyLen);
+    reverse_bytes(pbDest, mp_unsigned_bin_size(&pKeyContext->rsa.N));
     if (mp_unsigned_bin_size(&pKeyContext->rsa.N) < dwKeyLen)
         memset(pbDest + mp_unsigned_bin_size(&pKeyContext->rsa.N), 0,
                dwKeyLen - mp_unsigned_bin_size(&pKeyContext->rsa.N));




More information about the wine-cvs mailing list