mirror of
https://github.com/openssl/openssl.git
synced 2025-01-25 03:13:59 +08:00
Fixes so NO_RSA works again.
This commit is contained in:
parent
525f51f6c9
commit
12aefe78f0
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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);
|
||||
|
@ -39,6 +39,7 @@ foreach (@ARGV, split(/ /, $options))
|
||||
$do_crypto=1 if $_ eq "libeay";
|
||||
$do_crypto=1 if $_ eq "crypto";
|
||||
$do_update=1 if $_ eq "update";
|
||||
$do_ctest=1 if $_ eq "ctest";
|
||||
$rsaref=1 if $_ eq "rsaref";
|
||||
|
||||
if (/^no-rc2$/) { $no_rc2=1; }
|
||||
@ -59,6 +60,7 @@ foreach (@ARGV, split(/ /, $options))
|
||||
elsif (/^no-hmac$/) { $no_hmac=1; }
|
||||
}
|
||||
|
||||
|
||||
if (!$do_ssl && !$do_crypto)
|
||||
{
|
||||
print STDERR "usage: $0 ( ssl | crypto ) [ 16 | 32 | NT ] [rsaref]\n";
|
||||
@ -131,7 +133,26 @@ if($do_crypto == 1) {
|
||||
open(OUT, ">>$crypto_num");
|
||||
&update_numbers(*OUT,"LIBEAY",*crypto_list,$max_crypto, @crypto_func);
|
||||
close OUT;
|
||||
}
|
||||
}
|
||||
|
||||
} elsif ($do_ctest) {
|
||||
|
||||
print <<"EOF";
|
||||
|
||||
/* Test file to check all DEF file symbols are present by trying
|
||||
* to link to all of them. This is *not* intended to be run!
|
||||
*/
|
||||
|
||||
int main()
|
||||
{
|
||||
EOF
|
||||
&print_test_file(*STDOUT,"SSLEAY",*ssl_list,@ssl_func)
|
||||
if $do_ssl == 1;
|
||||
|
||||
&print_test_file(*STDOUT,"LIBEAY",*crypto_list,@crypto_func)
|
||||
if $do_crypto == 1;
|
||||
|
||||
print "}\n";
|
||||
|
||||
} else {
|
||||
|
||||
@ -340,6 +361,26 @@ sub do_defs
|
||||
return(@ret);
|
||||
}
|
||||
|
||||
sub print_test_file
|
||||
{
|
||||
(*OUT,my $name,*nums,@functions)=@_;
|
||||
my $n =1;
|
||||
|
||||
(@e)=grep(/^SSLeay/,@functions);
|
||||
(@r)=grep(!/^SSLeay/,@functions);
|
||||
@functions=((sort @e),(sort @r));
|
||||
|
||||
foreach $func (@functions) {
|
||||
if (!defined($nums{$func})) {
|
||||
printf STDERR "$func does not have a number assigned\n"
|
||||
if(!$do_update);
|
||||
} else {
|
||||
$n=$nums{$func};
|
||||
print OUT "\t$func();\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub print_def_file
|
||||
{
|
||||
(*OUT,my $name,*nums,@functions)=@_;
|
||||
|
Loading…
Reference in New Issue
Block a user