Commit 12aefe78 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Fixes so NO_RSA works again.

parent 525f51f6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@
#include "apps.h"
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
+4 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp)
/* The following are equivalents but which return RSA and DSA
 * keys
 */

#ifndef NO_RSA
RSA *d2i_RSA_PUBKEY(RSA **a, unsigned char **pp,
	     long length)
{
@@ -323,7 +323,9 @@ int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp)
	EVP_PKEY_free(pktmp);
	return ret;
}
#endif

#ifndef NO_DSA
DSA *d2i_DSA_PUBKEY(DSA **a, unsigned char **pp,
	     long length)
{
@@ -359,3 +361,4 @@ int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp)
	EVP_PKEY_free(pktmp);
	return ret;
}
#endif
+8 −2
Original line number Diff line number Diff line
@@ -612,12 +612,18 @@ int EVP_PKEY_type(int type);
int		EVP_PKEY_bits(EVP_PKEY *pkey);
int		EVP_PKEY_size(EVP_PKEY *pkey);
int 		EVP_PKEY_assign(EVP_PKEY *pkey,int type,char *key);
#ifndef NO_RSA
int 		EVP_PKEY_rset_RSA(EVP_PKEY *pkey,RSA *key);
int 		EVP_PKEY_rset_DSA(EVP_PKEY *pkey,DSA *key);
int 		EVP_PKEY_rset_DH(EVP_PKEY *pkey,DH *key);
RSA *		EVP_PKEY_rget_RSA(EVP_PKEY *pkey);
#endif
#ifndef NO_DSA
int 		EVP_PKEY_rset_DSA(EVP_PKEY *pkey,DSA *key);
DSA *		EVP_PKEY_rget_DSA(EVP_PKEY *pkey);
#endif
#ifndef NO_DH
int 		EVP_PKEY_rset_DH(EVP_PKEY *pkey,DH *key);
DH *		EVP_PKEY_rget_DH(EVP_PKEY *pkey);
#endif
EVP_PKEY *	EVP_PKEY_new(void);
void		EVP_PKEY_free(EVP_PKEY *pkey);
EVP_PKEY *	d2i_PublicKey(int type,EVP_PKEY **a, unsigned char **pp,
+4 −0
Original line number Diff line number Diff line
@@ -65,8 +65,12 @@
#include <openssl/pkcs7.h>
#include <openssl/pem.h>

#ifndef NO_RSA
static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa);
#endif
#ifndef NO_DSA
static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa);
#endif

IMPLEMENT_PEM_rw(X509, X509, PEM_STRING_X509, X509)

+4 −0
Original line number Diff line number Diff line
@@ -747,12 +747,16 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey,
int		i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp);
EVP_PKEY *	d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp,
			long length);
#ifndef NO_RSA
int		i2d_RSA_PUBKEY(RSA *a,unsigned char **pp);
RSA *		d2i_RSA_PUBKEY(RSA **a,unsigned char **pp,
			long length);
#endif
#ifndef NO_DSA
int		i2d_DSA_PUBKEY(DSA *a,unsigned char **pp);
DSA *		d2i_DSA_PUBKEY(DSA **a,unsigned char **pp,
			long length);
#endif

X509_SIG *	X509_SIG_new(void );
void		X509_SIG_free(X509_SIG *a);
Loading