ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/rsa.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/rsa.c (file contents):
Revision 3457 by michael, Thu May 1 19:42:52 2014 UTC vs.
Revision 3504 by michael, Sat May 10 19:51:29 2014 UTC

# Line 92 | Line 92 | generate_challenge(char **r_challenge, c
92      return -1;
93  
94    get_randomness(secret, 32);
95 <  *r_response = MyMalloc(65);
95 >  *r_response = MyCalloc(65);
96    binary_to_hex(secret, *r_response, 32);
97  
98    length = RSA_size(rsa);
99 <  tmp = MyMalloc(length);
99 >  tmp = MyCalloc(length);
100    ret = RSA_public_encrypt(32, secret, tmp, rsa, RSA_PKCS1_PADDING);
101  
102 <  *r_challenge = MyMalloc((length << 1) + 1);
102 >  *r_challenge = MyCalloc((length << 1) + 1);
103    binary_to_hex( tmp, *r_challenge, length);
104    (*r_challenge)[length << 1] = 0;
105    MyFree(tmp);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)