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-7.2/src/rsa.c (file contents):
Revision 1015 by michael, Sun Oct 25 00:08:06 2009 UTC vs.
Revision 1016 by michael, Tue Oct 27 18:53:47 2009 UTC

# Line 27 | Line 27
27   #include <openssl/pem.h>
28   #include <openssl/rand.h>
29   #include <openssl/rsa.h>
30 #include <openssl/md5.h>
30   #include <openssl/bn.h>
31   #include <openssl/evp.h>
32   #include <openssl/err.h>
# Line 99 | Line 98 | verify_private_key(void)
98      return -1;
99    }
100  
101 <  /*
103 <   * jdc -- Let's do this a little differently.  According to the
104 <   *        OpenSSL documentation, you need to METHOD_free(key) before
105 <   *        assigning it.  Don't believe me?  Check out the following
106 <   *        URL:  http://www.openssl.org/docs/crypto/pem.html#BUGS
107 <   * P.S. -- I have no idea why the key= assignment has to be typecasted.
108 <   *         For some reason the system thinks PEM_read_bio_RSAPrivateKey
109 <   *         is returning an int, not a RSA *.
110 <   * androsyn -- Thats because you didn't have a prototype and including
111 <   *             pem.h breaks things for some reason..
112 <   */
113 <  key = (RSA *) PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
101 >  key = PEM_read_bio_RSAPrivateKey(file, NULL, 0, NULL);
102  
103    if (key == NULL)
104    {

Diff Legend

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