Remove NOPROTO definitions and error code comments.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -5,6 +5,9 @@
|
||||
|
||||
Changes between 0.9.2b and 0.9.3
|
||||
|
||||
*) Remove NOPROTO sections and error code comments.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) Partial rewrite of the DEF file generator to now parse the ANSI
|
||||
prototypes.
|
||||
[Steve Henson]
|
||||
|
@@ -69,12 +69,7 @@
|
||||
# include "bss_file.c"
|
||||
#endif
|
||||
|
||||
#ifndef NOPROTO
|
||||
int app_init(long mesgwin);
|
||||
#else
|
||||
int app_init();
|
||||
#endif
|
||||
|
||||
#ifdef undef /* never finished - probably never will be :-) */
|
||||
int args_from_file(char *file, int *argc, char **argv[])
|
||||
{
|
||||
|
@@ -127,20 +127,11 @@ typedef struct args_st
|
||||
int count;
|
||||
} ARGS;
|
||||
|
||||
#ifndef NOPROTO
|
||||
int should_retry(int i);
|
||||
int args_from_file(char *file, int *argc, char **argv[]);
|
||||
int str2fmt(char *s);
|
||||
void program_name(char *in,char *out,int size);
|
||||
int chopup_args(ARGS *arg,char *buf, int *argc, char **argv[]);
|
||||
#else
|
||||
int should_retry();
|
||||
int args_from_file();
|
||||
int str2fmt();
|
||||
void program_name();
|
||||
int chopup_args();
|
||||
#endif
|
||||
|
||||
#define FORMAT_UNDEF 0
|
||||
#define FORMAT_ASN1 1
|
||||
#define FORMAT_TEXT 2
|
||||
|
22
apps/ca.c
22
apps/ca.c
@@ -156,7 +156,6 @@ extern int EF_PROTECT_BELOW;
|
||||
extern int EF_ALIGNMENT;
|
||||
#endif
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int add_oid_section(LHASH *conf);
|
||||
static void lookup_fail(char *name,char *tag);
|
||||
static int MS_CALLBACK key_callback(char *buf,int len,int verify);
|
||||
@@ -187,27 +186,6 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||
LHASH *conf);
|
||||
static int do_revoke(X509 *x509, TXT_DB *db);
|
||||
static int check_time_format(char *str);
|
||||
#else
|
||||
static int add_oid_section();
|
||||
static void lookup_fail();
|
||||
static int MS_CALLBACK key_callback();
|
||||
static unsigned long index_serial_hash();
|
||||
static int index_serial_cmp();
|
||||
static unsigned long index_name_hash();
|
||||
static int index_name_qual();
|
||||
static int index_name_cmp();
|
||||
static int fix_data();
|
||||
static BIGNUM *load_serial();
|
||||
static int save_serial();
|
||||
static int certify();
|
||||
static int certify_cert();
|
||||
static int certify_spkac();
|
||||
static void write_new_certificate();
|
||||
static int do_body();
|
||||
static int do_revoke();
|
||||
static int check_time_format();
|
||||
#endif
|
||||
|
||||
static LHASH *conf;
|
||||
static char *key=NULL;
|
||||
static char *section=NULL;
|
||||
|
@@ -88,12 +88,7 @@ static char *crl_usage[]={
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifndef NOPROTO
|
||||
static X509_CRL *load_crl(char *file, int format);
|
||||
#else
|
||||
static X509_CRL *load_crl();
|
||||
#endif
|
||||
|
||||
static BIO *bio_out=NULL;
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
|
@@ -72,12 +72,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile);
|
||||
#else
|
||||
static int add_certs_from_file();
|
||||
#endif
|
||||
|
||||
#undef PROG
|
||||
#define PROG crl2pkcs7_main
|
||||
|
||||
|
@@ -73,12 +73,7 @@
|
||||
#undef PROG
|
||||
#define PROG dgst_main
|
||||
|
||||
#ifndef NOPROTO
|
||||
void do_fp(unsigned char *buf,BIO *f,int sep);
|
||||
#else
|
||||
void do_fp();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
unsigned char *buf=NULL;
|
||||
|
@@ -83,12 +83,7 @@
|
||||
* -genkey
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, char *arg);
|
||||
#else
|
||||
static void MS_CALLBACK dsa_cb();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
DSA *dsa=NULL;
|
||||
|
@@ -70,12 +70,7 @@
|
||||
#endif
|
||||
#include <openssl/pem.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
int set_hex(char *in,unsigned char *out,int size);
|
||||
#else
|
||||
int set_hex();
|
||||
#endif
|
||||
|
||||
#undef SIZE
|
||||
#undef BSIZE
|
||||
#undef PROG
|
||||
|
@@ -73,14 +73,8 @@
|
||||
#undef PROG
|
||||
#define PROG gendh_main
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void MS_CALLBACK dh_cb(int p, int n, char *arg);
|
||||
static long dh_load_rand(char *names);
|
||||
#else
|
||||
static void MS_CALLBACK dh_cb();
|
||||
static long dh_load_rand();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
char buffer[200];
|
||||
|
@@ -73,12 +73,7 @@
|
||||
#undef PROG
|
||||
#define PROG gendsa_main
|
||||
|
||||
#ifndef NOPROTO
|
||||
static long dsa_load_rand(char *names);
|
||||
#else
|
||||
static long dsa_load_rand();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
char buffer[200];
|
||||
|
@@ -74,14 +74,8 @@
|
||||
#undef PROG
|
||||
#define PROG genrsa_main
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void MS_CALLBACK genrsa_cb(int p, int n, char *arg);
|
||||
static long gr_load_rand(char *names);
|
||||
#else
|
||||
static void MS_CALLBACK genrsa_cb();
|
||||
static long gr_load_rand();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
int ret=1;
|
||||
|
@@ -65,11 +65,7 @@
|
||||
#undef PROG
|
||||
#define PROG nseq_main
|
||||
|
||||
#ifdef NOPROTO
|
||||
static int dump_cert_text(BIO *out, X509 *x);
|
||||
#else
|
||||
static int dump_cert_text();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
|
@@ -83,18 +83,10 @@
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static unsigned long MS_CALLBACK hash(FUNCTION *a);
|
||||
static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b);
|
||||
static LHASH *prog_init(void );
|
||||
static int do_cmd(LHASH *prog,int argc,char *argv[]);
|
||||
#else
|
||||
static unsigned long MS_CALLBACK hash();
|
||||
static int MS_CALLBACK cmp();
|
||||
static LHASH *prog_init();
|
||||
static int do_cmd();
|
||||
#endif
|
||||
|
||||
LHASH *config=NULL;
|
||||
char *default_config_file=NULL;
|
||||
|
||||
|
@@ -76,7 +76,6 @@ EVP_CIPHER *enc;
|
||||
#define CLCERTS 0x8
|
||||
#define CACERTS 0x10
|
||||
|
||||
#ifndef NOPROTO
|
||||
int get_cert_chain(X509 *cert, STACK **chain);
|
||||
int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options);
|
||||
int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options);
|
||||
@@ -85,17 +84,6 @@ int print_attribs(BIO *out, STACK *attrlst, char *name);
|
||||
void hex_prin(BIO *out, unsigned char *buf, int len);
|
||||
int alg_print(BIO *x, X509_ALGOR *alg);
|
||||
int cert_load(BIO *in, STACK *sk);
|
||||
#else
|
||||
int get_cert_chain();
|
||||
int dump_certs_keys_p12();
|
||||
int dump_certs_pkeys_bags();
|
||||
int dump_certs_pkeys_bag();
|
||||
int print_attribs();
|
||||
void hex_prin();
|
||||
int alg_print();
|
||||
int cert_load();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
char *infile=NULL, *outfile=NULL, *keyname = NULL;
|
||||
|
30
apps/progs.h
30
apps/progs.h
@@ -1,6 +1,5 @@
|
||||
/* This file was generated by progs.pl. */
|
||||
|
||||
#ifndef NOPROTO
|
||||
extern int verify_main(int argc,char *argv[]);
|
||||
extern int asn1parse_main(int argc,char *argv[]);
|
||||
extern int req_main(int argc,char *argv[]);
|
||||
@@ -28,35 +27,6 @@ extern int sess_id_main(int argc,char *argv[]);
|
||||
extern int ciphers_main(int argc,char *argv[]);
|
||||
extern int nseq_main(int argc,char *argv[]);
|
||||
extern int pkcs12_main(int argc,char *argv[]);
|
||||
#else
|
||||
extern int verify_main();
|
||||
extern int asn1parse_main();
|
||||
extern int req_main();
|
||||
extern int dgst_main();
|
||||
extern int dh_main();
|
||||
extern int enc_main();
|
||||
extern int gendh_main();
|
||||
extern int errstr_main();
|
||||
extern int ca_main();
|
||||
extern int crl_main();
|
||||
extern int rsa_main();
|
||||
extern int dsa_main();
|
||||
extern int dsaparam_main();
|
||||
extern int x509_main();
|
||||
extern int genrsa_main();
|
||||
extern int gendsa_main();
|
||||
extern int s_server_main();
|
||||
extern int s_client_main();
|
||||
extern int speed_main();
|
||||
extern int s_time_main();
|
||||
extern int version_main();
|
||||
extern int pkcs7_main();
|
||||
extern int crl2pkcs7_main();
|
||||
extern int sess_id_main();
|
||||
extern int ciphers_main();
|
||||
extern int nseq_main();
|
||||
extern int pkcs12_main();
|
||||
#endif
|
||||
|
||||
#ifdef SSLEAY_SRC /* Defined only in openssl.c. */
|
||||
|
||||
|
@@ -2,17 +2,10 @@
|
||||
|
||||
print "/* This file was generated by progs.pl. */\n\n";
|
||||
|
||||
print "#ifndef NOPROTO\n";
|
||||
|
||||
grep(s/^asn1pars$/asn1parse/,@ARGV);
|
||||
|
||||
foreach (@ARGV)
|
||||
{ printf "extern int %s_main(int argc,char *argv[]);\n",$_; }
|
||||
print "#else\n";
|
||||
foreach (@ARGV)
|
||||
{ printf "extern int %s_main();\n",$_; }
|
||||
print "#endif\n";
|
||||
|
||||
|
||||
print <<'EOF';
|
||||
|
||||
|
11
apps/req.c
11
apps/req.c
@@ -107,7 +107,6 @@
|
||||
* require. This format is wrong
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int make_REQ(X509_REQ *req,EVP_PKEY *pkey,int attribs);
|
||||
static int add_attribute_object(STACK *n, char *text, char *def,
|
||||
char *value, int nid,int min,int max);
|
||||
@@ -117,16 +116,6 @@ static void MS_CALLBACK req_cb(int p,int n,char *arg);
|
||||
static int req_fix_data(int nid,int *type,int len,int min,int max);
|
||||
static int check_end(char *str, char *end);
|
||||
static int add_oid_section(LHASH *conf);
|
||||
#else
|
||||
static int make_REQ();
|
||||
static int add_attribute_object();
|
||||
static int add_DN_object();
|
||||
static void MS_CALLBACK req_cb();
|
||||
static int req_fix_data();
|
||||
static int check_end();
|
||||
static int add_oid_section();
|
||||
#endif
|
||||
|
||||
#ifndef MONOLITH
|
||||
static char *default_config_file=NULL;
|
||||
static LHASH *config=NULL;
|
||||
|
@@ -60,7 +60,6 @@
|
||||
#define PORT_STR "4433"
|
||||
#define PROTOCOL "tcp"
|
||||
|
||||
#ifndef NOPROTO
|
||||
int do_accept(int acc_sock, int *sock, char **host);
|
||||
int do_server(int port, int *ret, int (*cb) (), char *context);
|
||||
#ifdef HEADER_X509_H
|
||||
@@ -95,25 +94,3 @@ void MS_CALLBACK apps_ssl_info_callback(SSL *s, int where, int ret);
|
||||
void MS_CALLBACK apps_ssl_info_callback(char *s, int where, int ret);
|
||||
#endif
|
||||
|
||||
#else
|
||||
int do_accept();
|
||||
int do_server();
|
||||
int MS_CALLBACK verify_callback();
|
||||
int set_cert_stuff();
|
||||
int init_client();
|
||||
int init_client_ip();
|
||||
int nbio_init_client_ip();
|
||||
int nbio_sock_error();
|
||||
int spawn();
|
||||
int init_server();
|
||||
int should_retry();
|
||||
void sock_cleanup();
|
||||
int extract_port();
|
||||
int extract_host_port();
|
||||
int host_ip();
|
||||
|
||||
long MS_CALLBACK bio_dump_cb();
|
||||
void MS_CALLBACK apps_ssl_info_callback();
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -92,14 +92,8 @@ static int c_Pause=0;
|
||||
static int c_debug=0;
|
||||
static int c_showcerts=0;
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void sc_usage(void);
|
||||
static void print_stuff(BIO *berr,SSL *con,int full);
|
||||
#else
|
||||
static void sc_usage();
|
||||
static void print_stuff();
|
||||
#endif
|
||||
|
||||
static BIO *bio_c_out=NULL;
|
||||
static int c_quiet=0;
|
||||
|
||||
|
@@ -74,7 +74,6 @@
|
||||
#include <openssl/ssl.h>
|
||||
#include "s_apps.h"
|
||||
|
||||
#ifndef NOPROTO
|
||||
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export,int keylength);
|
||||
static int sv_body(char *hostname, int s, unsigned char *context);
|
||||
static int www_body(char *hostname, int s, unsigned char *context);
|
||||
@@ -87,21 +86,6 @@ static DH *load_dh_param(void );
|
||||
static DH *get_dh512(void);
|
||||
#endif
|
||||
/* static void s_server_init(void);*/
|
||||
#else
|
||||
static RSA MS_CALLBACK *tmp_rsa_cb();
|
||||
static int sv_body();
|
||||
static int www_body();
|
||||
static void close_accept_socket();
|
||||
static void sv_usage();
|
||||
static int init_ssl_connection();
|
||||
static void print_stats();
|
||||
#ifndef NO_DH
|
||||
static DH *load_dh_param();
|
||||
static DH *get_dh512();
|
||||
#endif
|
||||
/* static void s_server_init(); */
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR)
|
||||
|
@@ -69,14 +69,8 @@
|
||||
#include "s_apps.h"
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static struct hostent *GetHostByName(char *name);
|
||||
int sock_init(void );
|
||||
#else
|
||||
static struct hostent *GetHostByName();
|
||||
int sock_init();
|
||||
#endif
|
||||
|
||||
#ifdef WIN16
|
||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||
#else
|
||||
|
@@ -151,18 +151,10 @@ struct tms {
|
||||
extern int verify_depth;
|
||||
extern int verify_error;
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void s_time_usage(void);
|
||||
static int parseArgs( int argc, char **argv );
|
||||
static SSL *doConnection( SSL *scon );
|
||||
static void s_time_init(void);
|
||||
#else
|
||||
static void s_time_usage();
|
||||
static int parseArgs();
|
||||
static SSL *doConnection();
|
||||
static void s_time_init();
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Static data declarations
|
||||
|
@@ -99,14 +99,8 @@ static int c_nbio=0;
|
||||
static int c_Pause=0;
|
||||
static int c_debug=0;
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void sc_usage(void);
|
||||
static void print_stuff(BIO *berr,SSL *con,int full);
|
||||
#else
|
||||
static void sc_usage();
|
||||
static void print_stuff();
|
||||
#endif
|
||||
|
||||
static BIO *bio_c_out=NULL;
|
||||
static int c_quiet=0;
|
||||
|
||||
|
@@ -83,12 +83,7 @@ static char *sess_id_usage[]={
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifndef NOPROTO
|
||||
static SSL_SESSION *load_sess_id(char *file, int format);
|
||||
#else
|
||||
static SSL_SESSION *load_sess_id();
|
||||
#endif
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
{
|
||||
SSL_SESSION *x=NULL;
|
||||
|
12
apps/speed.c
12
apps/speed.c
@@ -181,16 +181,9 @@ struct tms {
|
||||
#define BUFSIZE ((long)1024*8+1)
|
||||
int run=0;
|
||||
|
||||
#ifndef NOPROTO
|
||||
static double Time_F(int s);
|
||||
static void print_message(char *s,long num,int length);
|
||||
static void pkey_print_message(char *str,char *str2,long num,int bits,int sec);
|
||||
#else
|
||||
static double Time_F();
|
||||
static void print_message();
|
||||
static void pkey_print_message();
|
||||
#endif
|
||||
|
||||
#ifdef SIGALRM
|
||||
#if defined(__STDC__) || defined(sgi) || defined(_AIX)
|
||||
#define SIGRETTYPE void
|
||||
@@ -198,12 +191,7 @@ static void pkey_print_message();
|
||||
#define SIGRETTYPE int
|
||||
#endif
|
||||
|
||||
#ifndef NOPROTO
|
||||
static SIGRETTYPE sig_done(int sig);
|
||||
#else
|
||||
static SIGRETTYPE sig_done();
|
||||
#endif
|
||||
|
||||
static SIGRETTYPE sig_done(int sig)
|
||||
{
|
||||
signal(SIGALRM,sig_done);
|
||||
|
@@ -1,14 +1,7 @@
|
||||
/* NOCW */
|
||||
#ifndef NOPROTO
|
||||
DSA *get_dsa512(void );
|
||||
DSA *get_dsa1024(void );
|
||||
DSA *get_dsa2048(void );
|
||||
#else
|
||||
DSA *get_dsa512();
|
||||
DSA *get_dsa1024();
|
||||
DSA *get_dsa2048();
|
||||
#endif
|
||||
|
||||
static unsigned char dsa512_p[]={
|
||||
0x9D,0x1B,0x69,0x8E,0x26,0xDB,0xF2,0x2B,0x11,0x70,0x19,0x86,
|
||||
0xF6,0x19,0xC8,0xF8,0x19,0xF2,0x18,0x53,0x94,0x46,0x06,0xD0,
|
||||
|
@@ -68,14 +68,8 @@
|
||||
#undef PROG
|
||||
#define PROG verify_main
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int MS_CALLBACK cb(int ok, X509_STORE_CTX *ctx);
|
||||
static int check(X509_STORE *ctx,char *file);
|
||||
#else
|
||||
static int MS_CALLBACK cb();
|
||||
static int check();
|
||||
#endif
|
||||
|
||||
static int v_verbose=0;
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
|
@@ -117,7 +117,6 @@ static char *x509_usage[]={
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx);
|
||||
static EVP_PKEY *load_key(char *file, int format);
|
||||
static X509 *load_cert(char *file, int format);
|
||||
@@ -125,14 +124,6 @@ static int sign (X509 *x, EVP_PKEY *pkey,int days,const EVP_MD *digest);
|
||||
static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest,
|
||||
X509 *x,X509 *xca,EVP_PKEY *pkey,char *serial,
|
||||
int create,int days);
|
||||
#else
|
||||
static int MS_CALLBACK callb();
|
||||
static EVP_PKEY *load_key();
|
||||
static X509 *load_cert();
|
||||
static int sign ();
|
||||
static int x509_certify ();
|
||||
#endif
|
||||
|
||||
static int reqfile=0;
|
||||
|
||||
int MAIN(int argc, char **argv)
|
||||
|
@@ -60,10 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_ASN1_STRING_NEW,ASN1_R_STRING_TOO_SHORT);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,ASN1_R_EXPECTING_A_BIT_STRING);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
|
||||
{
|
||||
int ret,j,r,bits,len;
|
||||
|
@@ -60,9 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_BMPSTRING,ASN1_R_EXPECTING_AN_INTEGER);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -60,10 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,ASN1_R_EXPECTING_A_BOOLEAN);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_BOOLEAN,ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_BOOLEAN(int a, unsigned char **pp)
|
||||
{
|
||||
int r;
|
||||
|
@@ -60,10 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_TYPE_BYTES,ASN1_R_WRONG_TYPE);
|
||||
* ASN1err(ASN1_F_ASN1_COLLATE_PRIMATIVE,ASN1_R_WRONG_TAG);
|
||||
*/
|
||||
|
||||
static unsigned long tag2bit[32]={
|
||||
0, 0, 0, B_ASN1_BIT_STRING, /* tags 0 - 3 */
|
||||
B_ASN1_OCTET_STRING, 0, 0, B_ASN1_UNKNOWN,/* tags 4- 7 */
|
||||
@@ -75,12 +71,7 @@ B_ASN1_T61STRING,B_ASN1_VIDEOTEXSTRING,B_ASN1_IA5STRING,0,
|
||||
B_ASN1_UNIVERSALSTRING,B_ASN1_UNKNOWN,B_ASN1_BMPSTRING,B_ASN1_UNKNOWN,
|
||||
};
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int asn1_collate_primative(ASN1_STRING *a, ASN1_CTX *c);
|
||||
#else
|
||||
static int asn1_collate_primative();
|
||||
#endif
|
||||
|
||||
/* type is a 'bitmap' of acceptable string types.
|
||||
*/
|
||||
ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp,
|
||||
|
@@ -62,9 +62,6 @@
|
||||
|
||||
/* Support for ASN1 ENUMERATED type: based on a_int.c */
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,ASN1_R_EXPECTING_AN_ENUMERATED);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp)
|
||||
{
|
||||
int pad=0,ret,r,i,t;
|
||||
|
@@ -63,10 +63,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_NEW,ASN1_R_GENERALIZEDTIME_TOO_LONG);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ASN1_R_EXPECTING_A_GENERALIZEDTIME);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -61,13 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_ASN1_HEADER,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_ASN1_HEADER,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
|
||||
* ASN1err(ASN1_F_I2D_ASN1_HEADER,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
|
||||
* ASN1err(ASN1_F_ASN1_HEADER_NEW,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_HEADER(ASN1_HEADER *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -60,9 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_INTEGER,ASN1_R_EXPECTING_AN_INTEGER);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
|
||||
{
|
||||
int pad=0,ret,r,i,t;
|
||||
|
@@ -62,11 +62,6 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
/* ASN1err(ASN1_F_ASN1_OBJECT_NEW,ASN1_R_EXPECTING_AN_OBJECT);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_OBJECT,ASN1_R_BAD_OBJECT_HEADER);
|
||||
* ASN1err(ASN1_F_I2T_ASN1_OBJECT,ASN1_R_BAD_OBJECT_HEADER);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp)
|
||||
{
|
||||
unsigned char *p;
|
||||
|
@@ -60,9 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_OCTET_STRING,ASN1_R_EXPECTING_AN_OCTET_STRING);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -60,10 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_PRINT_TYPE,ASN1_R_WRONG_PRINTABLE_TYPE);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_PRINT_TYPE,ASN1_R_TAG_VALUE_TOO_HIGH);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **pp)
|
||||
{ return(M_i2d_ASN1_IA5STRING(a,pp)); }
|
||||
|
||||
|
@@ -60,8 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/* ASN1err(ASN1_F_ASN1_TYPE_NEW,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned char *pbData;
|
||||
|
@@ -60,16 +60,7 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_BYTES,ASN1_R_WRONG_TAG);
|
||||
* ASN1err(ASN1_F_ASN1_COLLATE_PRIMATIVE,ASN1_R_WRONG_TAG);
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void ASN1_TYPE_component_free(ASN1_TYPE *a);
|
||||
#else
|
||||
static void ASN1_TYPE_component_free();
|
||||
#endif
|
||||
|
||||
int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp)
|
||||
{
|
||||
int r=0;
|
||||
|
@@ -61,10 +61,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_ASN1_UTCTIME_NEW,ASN1_R_UTCTIME_TOO_LONG);
|
||||
* ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_EXPECTING_A_UTCTIME);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -60,9 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_UTF8STRING,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -60,9 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_ASN1_VISIBLESTRING,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
|
||||
int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **pp)
|
||||
{
|
||||
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
|
||||
|
@@ -452,7 +452,6 @@ typedef struct asn1_header_st
|
||||
#define IS_SEQUENCE 0
|
||||
#define IS_SET 1
|
||||
|
||||
#ifndef NOPROTO
|
||||
ASN1_TYPE * ASN1_TYPE_new(void );
|
||||
void ASN1_TYPE_free(ASN1_TYPE *a);
|
||||
int i2d_ASN1_TYPE(ASN1_TYPE *a,unsigned char **pp);
|
||||
@@ -678,137 +677,6 @@ unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf,
|
||||
char *ASN1_unpack_string(ASN1_STRING *oct, char *(*d2i)());
|
||||
ASN1_STRING *ASN1_pack_string(char *obj, int (*i2d)(), ASN1_OCTET_STRING **oct);
|
||||
|
||||
#else
|
||||
#error "OpenSSL cannot be used with NOPROTO defined. The NOPROTO sections in header files exist only for automatic parsing by certain utilities."
|
||||
/* Without this, highly uncomprehensible error messages can occur
|
||||
* when compiling something with -DNOPROTO ... */
|
||||
|
||||
ASN1_TYPE * ASN1_TYPE_new();
|
||||
void ASN1_TYPE_free();
|
||||
int i2d_ASN1_TYPE();
|
||||
ASN1_TYPE * d2i_ASN1_TYPE();
|
||||
int ASN1_TYPE_get();
|
||||
void ASN1_TYPE_set();
|
||||
|
||||
ASN1_OBJECT * ASN1_OBJECT_new();
|
||||
void ASN1_OBJECT_free();
|
||||
int i2d_ASN1_OBJECT();
|
||||
ASN1_OBJECT * d2i_ASN1_OBJECT();
|
||||
ASN1_STRING * ASN1_STRING_new();
|
||||
void ASN1_STRING_free();
|
||||
ASN1_STRING * ASN1_STRING_dup();
|
||||
ASN1_STRING * ASN1_STRING_type_new();
|
||||
int ASN1_STRING_cmp();
|
||||
int ASN1_STRING_set();
|
||||
int i2d_ASN1_BIT_STRING();
|
||||
ASN1_BIT_STRING *d2i_ASN1_BIT_STRING();
|
||||
int ASN1_BIT_STRING_set_bit();
|
||||
int ASN1_BIT_STRING_get_bit();
|
||||
int i2d_ASN1_BOOLEAN();
|
||||
int d2i_ASN1_BOOLEAN();
|
||||
int i2d_ASN1_INTEGER();
|
||||
ASN1_INTEGER *d2i_ASN1_INTEGER();
|
||||
int i2d_ASN1_ENUMERATED();
|
||||
ASN1_INTEGER *d2i_ASN1_ENUMERATED();
|
||||
int ASN1_UTCTIME_check();
|
||||
ASN1_UTCTIME *ASN1_UTCTIME_set();
|
||||
int ASN1_UTCTIME_set_string();
|
||||
int ASN1_GENERALIZEDTIME_check();
|
||||
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set();
|
||||
int ASN1_GENERALIZEDTIME_set_string();
|
||||
int i2d_ASN1_OCTET_STRING();
|
||||
ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING();
|
||||
int i2d_ASN1_VISIBLESTRING();
|
||||
ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING();
|
||||
int i2d_ASN1_UTF8STRING();
|
||||
ASN1_UTF8STRING *d2i_ASN1_UTF8STRING();
|
||||
int i2d_ASN1_PRINTABLE();
|
||||
ASN1_STRING *d2i_ASN1_PRINTABLE();
|
||||
int i2d_DIRECTORYSTRING();
|
||||
ASN1_STRING *d2i_DIRECTORYSTRING();
|
||||
int i2d_DISPLAYTEXT();
|
||||
ASN1_STRING *d2i_DISPLAYTEXT();
|
||||
ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING();
|
||||
ASN1_T61STRING *d2i_ASN1_T61STRING();
|
||||
int i2d_ASN1_IA5STRING();
|
||||
ASN1_IA5STRING *d2i_ASN1_IA5STRING();
|
||||
int i2d_ASN1_UTCTIME();
|
||||
ASN1_UTCTIME * d2i_ASN1_UTCTIME();
|
||||
int i2d_ASN1_GENERALIZEDTIME();
|
||||
ASN1_GENERALIZEDTIME * d2i_ASN1_GENERALIZEDTIME();
|
||||
int i2d_ASN1_TIME();
|
||||
ASN1_TIME * d2i_ASN1_TIME();
|
||||
ASN1_TIME *ASN1_TIME_set();
|
||||
int i2d_ASN1_SET();
|
||||
STACK * d2i_ASN1_SET();
|
||||
int a2d_ASN1_OBJECT();
|
||||
ASN1_OBJECT *ASN1_OBJECT_create();
|
||||
int ASN1_INTEGER_set();
|
||||
long ASN1_INTEGER_get();
|
||||
ASN1_INTEGER *BN_to_ASN1_INTEGER();
|
||||
BIGNUM *ASN1_INTEGER_to_BN();
|
||||
int ASN1_ENUMERATED_set();
|
||||
long ASN1_ENUMERATED_get();
|
||||
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED();
|
||||
BIGNUM *ASN1_ENUMERATED_to_BN();
|
||||
int ASN1_PRINTABLE_type();
|
||||
int i2d_ASN1_bytes();
|
||||
ASN1_STRING *d2i_ASN1_bytes();
|
||||
ASN1_STRING *d2i_ASN1_type_bytes();
|
||||
int asn1_Finish();
|
||||
int ASN1_get_object();
|
||||
int ASN1_check_infinite_end();
|
||||
void ASN1_put_object();
|
||||
int ASN1_object_size();
|
||||
char *ASN1_dup();
|
||||
#ifndef NO_FP_API
|
||||
char *ASN1_d2i_fp();
|
||||
int ASN1_i2d_fp();
|
||||
#endif
|
||||
|
||||
char *ASN1_d2i_bio();
|
||||
int ASN1_i2d_bio();
|
||||
int ASN1_UTCTIME_print();
|
||||
int ASN1_GENERALIZEDTIME_print();
|
||||
int ASN1_TIME_print();
|
||||
int ASN1_STRING_print();
|
||||
int ASN1_parse();
|
||||
int i2a_ASN1_INTEGER();
|
||||
int a2i_ASN1_INTEGER();
|
||||
int i2a_ASN1_ENUMERATED();
|
||||
int a2i_ASN1_ENUMERATED();
|
||||
int i2a_ASN1_OBJECT();
|
||||
int i2t_ASN1_OBJECT();
|
||||
int a2i_ASN1_STRING();
|
||||
int i2a_ASN1_STRING();
|
||||
|
||||
int i2d_ASN1_HEADER();
|
||||
ASN1_HEADER *d2i_ASN1_HEADER();
|
||||
ASN1_HEADER *ASN1_HEADER_new();
|
||||
void ASN1_HEADER_free();
|
||||
void ERR_load_ASN1_strings();
|
||||
ASN1_METHOD *X509_asn1_meth();
|
||||
ASN1_METHOD *RSAPrivateKey_asn1_meth();
|
||||
ASN1_METHOD *ASN1_IA5STRING_asn1_meth();
|
||||
ASN1_METHOD *ASN1_BIT_STRING_asn1_meth();
|
||||
|
||||
int ASN1_UNIVERSALSTRING_to_string();
|
||||
|
||||
int ASN1_TYPE_set_octetstring();
|
||||
int ASN1_TYPE_get_octetstring();
|
||||
int ASN1_TYPE_set_int_octetstring();
|
||||
int ASN1_TYPE_get_int_octetstring();
|
||||
|
||||
int i2d_ASN1_BMPSTRING();
|
||||
ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
|
||||
|
||||
STACK *ASN1_seq_unpack();
|
||||
unsigned char *ASN1_seq_pack();
|
||||
char *ASN1_unpack_string();
|
||||
ASN1_STRING *ASN1_pack_string();
|
||||
|
||||
#endif
|
||||
|
||||
/* BEGIN ERROR CODES */
|
||||
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
||||
* made after this point may be overwritten when the script is next run.
|
||||
|
@@ -61,14 +61,8 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int asn1_get_length(unsigned char **pp,int *inf,long *rl,int max);
|
||||
static void asn1_put_length(unsigned char **pp, int length);
|
||||
#else
|
||||
static int asn1_get_length();
|
||||
static void asn1_put_length();
|
||||
#endif
|
||||
|
||||
const char *ASN1_version="ASN.1" OPENSSL_VERSION_PTEXT;
|
||||
|
||||
int ASN1_check_infinite_end(unsigned char **p, long len)
|
||||
|
@@ -447,14 +447,8 @@ err:\
|
||||
#define M_ASN1_I2D_finish() *pp=p; \
|
||||
return(r);
|
||||
|
||||
#ifndef NOPROTO
|
||||
int asn1_GetSequence(ASN1_CTX *c, long *length);
|
||||
void asn1_add_error(unsigned char *address,int offset);
|
||||
#else
|
||||
int asn1_GetSequence();
|
||||
void asn1_add_error();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -62,16 +62,10 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int asn1_print_info(BIO *bp, int tag, int xclass,int constructed,
|
||||
int indent);
|
||||
static int asn1_parse2(BIO *bp, unsigned char **pp, long length,
|
||||
int offset, int depth, int indent);
|
||||
#else
|
||||
static int asn1_print_info();
|
||||
static int asn1_parse2();
|
||||
#endif
|
||||
|
||||
static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
|
||||
int indent)
|
||||
{
|
||||
|
@@ -63,11 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DHPARAMS,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_DHPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
DH *d2i_DHparams(DH **a, unsigned char **pp, long length)
|
||||
{
|
||||
int i=ERR_R_NESTED_ASN1_ERROR;
|
||||
|
@@ -63,11 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DSAPARAMS,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_DSAPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
|
||||
{
|
||||
int i=ERR_R_NESTED_ASN1_ERROR;
|
||||
|
@@ -63,12 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
* ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_PARSING);
|
||||
*/
|
||||
|
||||
static ASN1_METHOD method={
|
||||
(int (*)()) i2d_RSAPrivateKey,
|
||||
(char *(*)())d2i_RSAPrivateKey,
|
||||
|
@@ -63,11 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_RSAPUBLICKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
RSA *d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length)
|
||||
{
|
||||
int i=ASN1_R_PARSING;
|
||||
|
@@ -56,7 +56,7 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
/* Origional version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
|
||||
/* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
@@ -65,12 +65,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
* ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_PARSING);
|
||||
*/
|
||||
|
||||
DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length)
|
||||
{
|
||||
int i=ASN1_R_PARSING;
|
||||
|
@@ -65,11 +65,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DSAPUBLICKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
DSA *d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length)
|
||||
{
|
||||
int i=ASN1_R_PARSING;
|
||||
|
@@ -62,11 +62,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/dh.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DHPARAMS,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_DHPARAMS_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_DHparams(DH *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[3];
|
||||
|
@@ -62,10 +62,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/dsa.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_DSAPARAMS,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_DSAparams(DSA *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[3];
|
||||
|
@@ -63,11 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
int i2d_RSAPrivateKey(RSA *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[9];
|
||||
|
@@ -63,11 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_RSAPUBLICKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
int i2d_RSAPublicKey(RSA *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[2];
|
||||
|
@@ -63,10 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
int i2d_DSAPrivateKey(DSA *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[6];
|
||||
|
@@ -63,10 +63,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
int i2d_DSAPublicKey(DSA *a, unsigned char **pp)
|
||||
{
|
||||
BIGNUM *num[4];
|
||||
|
@@ -74,24 +74,10 @@ typedef struct netscape_pkey_st
|
||||
ASN1_OCTET_STRING *private_key;
|
||||
} NETSCAPE_PKEY;
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_RSA,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_RSA,ASN1_R_DECODING_ERROR);
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_PKEY,ASN1_R_DECODING_ERROR);
|
||||
* ASN1err(ASN1_F_NETSCAPE_PKEY_NEW,ASN1_R_DECODING_ERROR);
|
||||
*/
|
||||
#ifndef NOPROTO
|
||||
static int i2d_NETSCAPE_PKEY(NETSCAPE_PKEY *a, unsigned char **pp);
|
||||
static NETSCAPE_PKEY *d2i_NETSCAPE_PKEY(NETSCAPE_PKEY **a,unsigned char **pp, long length);
|
||||
static NETSCAPE_PKEY *NETSCAPE_PKEY_new(void);
|
||||
static void NETSCAPE_PKEY_free(NETSCAPE_PKEY *);
|
||||
#else
|
||||
static int i2d_NETSCAPE_PKEY();
|
||||
static NETSCAPE_PKEY *d2i_NETSCAPE_PKEY();
|
||||
static NETSCAPE_PKEY *NETSCAPE_PKEY_new();
|
||||
static void NETSCAPE_PKEY_free();
|
||||
#endif
|
||||
|
||||
int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)())
|
||||
{
|
||||
int i,j,l[6];
|
||||
|
@@ -65,11 +65,6 @@
|
||||
|
||||
/* Netscape certificate sequence structure */
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_NETSCAPE_CERT_SEQUENCE_NEW,ERR_R_MALLOC_FAILURE);
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_CERT_SEQUENCE,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
|
||||
int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **pp)
|
||||
{
|
||||
int v = 0;
|
||||
|
@@ -65,11 +65,6 @@
|
||||
|
||||
#define PKCS5_SALT_LEN 8
|
||||
|
||||
/*
|
||||
*ASN1err(ASN1_F_PBEPARAM_NEW,ASN1_R_DECODE_ERROR)
|
||||
*ASN1err(ASN1_F_D2I_PBEPARAM,ASN1_R_DECODE_ERROR)
|
||||
*/
|
||||
|
||||
int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -63,13 +63,6 @@
|
||||
|
||||
/* PKCS#5 v2.0 password based encryption structures */
|
||||
|
||||
/*
|
||||
*ASN1err(ASN1_F_PBE2PARAM_NEW,ASN1_R_DECODE_ERROR)
|
||||
*ASN1err(ASN1_F_D2I_PBE2PARAM,ASN1_R_DECODE_ERROR)
|
||||
*ASN1err(ASN1_F_PBKDF2PARAM_NEW,ASN1_R_DECODE_ERROR)
|
||||
*ASN1err(ASN1_F_D2I_PBKDF2PARAM,ASN1_R_DECODE_ERROR)
|
||||
*/
|
||||
|
||||
int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_DIGEST_NEW,ERR_R_MISSING_ASN1_EOS);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_DIGEST,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_ENCRYPT_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_ENCRYPT,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_ENC_CONTENT_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_ENC_CONTENT,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_ENVELOPE_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_ENVELOPE,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a,
|
||||
unsigned char **pp)
|
||||
{
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_PKCS7,ASN1_R_BAD_PKCS7_CONTENT);
|
||||
* ASN1err(ASN1_F_I2D_PKCS7,ASN1_R_BAD_PKCS7_TYPE);
|
||||
* ASN1err(ASN1_F_PKCS7_NEW,ASN1_R_BAD_PKCS7_TYPE);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7(PKCS7 *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_RECIP_INFO_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_RECIP_INFO,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_SIGN_ENVELOPE,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_SIGNED_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_SIGNED,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_PKCS7_SIGNER_INFO_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_PKCS7_SIGNER_INFO,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -60,11 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
*ASN1err(ASN1_F_PKCS8_PRIV_KEY_INFO_NEW,ASN1_R_DECODE_ERROR)
|
||||
*ASN1err(ASN1_F_D2I_PKCS8_PRIV_KEY_INFO,ASN1_R_DECODE_ERROR)
|
||||
*/
|
||||
|
||||
int i2d_PKCS8_PRIV_KEY_INFO (PKCS8_PRIV_KEY_INFO *a, unsigned char **pp)
|
||||
{
|
||||
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/objects.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_KEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_KEY_NEW,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
|
||||
*/
|
||||
|
||||
int i2d_X509_KEY(X509 *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -64,12 +64,7 @@
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static void ext_print(BIO *out, X509_EXTENSION *ex);
|
||||
#else
|
||||
static void ext_print();
|
||||
#endif
|
||||
|
||||
#ifndef NO_FP_API
|
||||
int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
|
||||
{
|
||||
|
@@ -70,17 +70,8 @@
|
||||
#include <openssl/dsa.h>
|
||||
#endif
|
||||
|
||||
/* DHerr(DH_F_DHPARAMS_PRINT,ERR_R_MALLOC_FAILURE);
|
||||
* DSAerr(DSA_F_DSAPARAMS_PRINT,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int print(BIO *fp,const char *str,BIGNUM *num,
|
||||
unsigned char *buf,int off);
|
||||
#else
|
||||
static int print();
|
||||
#endif
|
||||
|
||||
#ifndef NO_RSA
|
||||
#ifndef NO_FP_API
|
||||
int RSA_print_fp(FILE *fp, RSA *x, int off)
|
||||
|
@@ -60,12 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_ALGOR,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_ALGOR_NEW,ERR_R_EXPECTING_AN_ASN1_SEQUENCE);
|
||||
* ASN1err(ASN1_F_D2I_X509_ALGOR,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,12 +61,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_ATTRIBUTE,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_ATTRIBUTE_NEW,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
* ASN1err(ASN1_F_I2D_X509_ATTRIBUTE,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
/* sequence */
|
||||
int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a, unsigned char **pp)
|
||||
{
|
||||
|
@@ -60,11 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_CINF,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_CINF_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_CINF(X509_CINF *a, unsigned char **pp)
|
||||
{
|
||||
int v1=0,v2=0;
|
||||
|
@@ -61,23 +61,8 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_CRL,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_X509_CRL_INFO,ERR_R_EXPECTING_AN_ASN1_SEQUENCE);
|
||||
* ASN1err(ASN1_F_D2I_X509_REVOKED,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_CRL_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_CRL_INFO_NEW,ERR_R_EXPECTING_AN_ASN1_SEQUENCE);
|
||||
* ASN1err(ASN1_F_X509_REVOKED_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int X509_REVOKED_cmp(X509_REVOKED **a,X509_REVOKED **b);
|
||||
static int X509_REVOKED_seq_cmp(X509_REVOKED **a,X509_REVOKED **b);
|
||||
#else
|
||||
static int X509_REVOKED_cmp();
|
||||
static int X509_REVOKED_seq_cmp();
|
||||
#endif
|
||||
|
||||
int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_EXTENSION,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_EXTENSION_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **pp)
|
||||
{
|
||||
int k=0;
|
||||
|
@@ -61,19 +61,7 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_NAME,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_NAME_NEW,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
* ASN1err(ASN1_F_D2I_X509_NAME_ENTRY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_NAME_ENTRY_NEW,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE);
|
||||
*/
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int i2d_X509_NAME_entries(X509_NAME *a);
|
||||
#else
|
||||
static int i2d_X509_NAME_entries();
|
||||
#endif
|
||||
|
||||
int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -62,9 +62,6 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/* ASN1err(ASN1_F_D2I_X509_PKEY,ASN1_R_UNSUPPORTED_CIPHER); */
|
||||
/* ASN1err(ASN1_F_X509_PKEY_NEW,ASN1_R_IV_TOO_LARGE); */
|
||||
|
||||
/* need to implement */
|
||||
int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp)
|
||||
{
|
||||
|
@@ -60,11 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_PUBKEY,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_PUBKEY_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_PUBKEY(X509_PUBKEY *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,13 +61,6 @@
|
||||
#include <openssl/asn1_mac.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_REQ,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_X509_REQ_INFO,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_REQ_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_REQ_INFO_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -60,11 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509_SIG,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_SIG_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_X509_SIG(X509_SIG *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -65,13 +65,6 @@
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_SPKAC,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_NETSCAPE_SPKAC_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_D2I_NETSCAPE_SPKI,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_NETSCAPE_SPKI_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
*/
|
||||
|
||||
int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -60,11 +60,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/* ASN1err(ASN1_F_X509_VAL_NEW,ERR_R_MALLOC_FAILURE);
|
||||
* ASN1err(ASN1_F_X509_VAL_FREE,ERR_R_MALLOC_FAILURE);
|
||||
* ASN1err(ASN1_F_D2I_X509_VAL,ERR_R_MALLOC_FAILURE);
|
||||
*/
|
||||
|
||||
int i2d_X509_VAL(X509_VAL *a, unsigned char **pp)
|
||||
{
|
||||
M_ASN1_I2D_vars(a);
|
||||
|
@@ -61,11 +61,6 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/asn1_mac.h>
|
||||
|
||||
/*
|
||||
* ASN1err(ASN1_F_D2I_X509,ERR_R_ASN1_LENGTH_MISMATCH);
|
||||
* ASN1err(ASN1_F_X509_NEW,ERR_R_BAD_GET_ASN1_OBJECT_CALL);
|
||||
*/
|
||||
|
||||
static ASN1_METHOD meth={
|
||||
(int (*)()) i2d_X509,
|
||||
(char *(*)())d2i_X509,
|
||||
|
@@ -143,12 +143,7 @@ struct tms {
|
||||
#define BUFSIZE ((long)1024)
|
||||
long run=0;
|
||||
|
||||
#ifndef NOPROTO
|
||||
double Time_F(int s);
|
||||
#else
|
||||
double Time_F();
|
||||
#endif
|
||||
|
||||
#ifdef SIGALRM
|
||||
#if defined(__STDC__) || defined(sgi)
|
||||
#define SIGRETTYPE void
|
||||
@@ -156,12 +151,7 @@ double Time_F();
|
||||
#define SIGRETTYPE int
|
||||
#endif
|
||||
|
||||
#ifndef NOPROTO
|
||||
SIGRETTYPE sig_done(int sig);
|
||||
#else
|
||||
SIGRETTYPE sig_done();
|
||||
#endif
|
||||
|
||||
SIGRETTYPE sig_done(int sig)
|
||||
{
|
||||
signal(SIGALRM,sig_done);
|
||||
|
@@ -116,12 +116,7 @@ struct tms {
|
||||
#define BUFSIZE ((long)1024)
|
||||
long run=0;
|
||||
|
||||
#ifndef NOPROTO
|
||||
double Time_F(int s);
|
||||
#else
|
||||
double Time_F();
|
||||
#endif
|
||||
|
||||
#ifdef SIGALRM
|
||||
#if defined(__STDC__) || defined(sgi) || defined(_AIX)
|
||||
#define SIGRETTYPE void
|
||||
@@ -129,12 +124,7 @@ double Time_F();
|
||||
#define SIGRETTYPE int
|
||||
#endif
|
||||
|
||||
#ifndef NOPROTO
|
||||
SIGRETTYPE sig_done(int sig);
|
||||
#else
|
||||
SIGRETTYPE sig_done();
|
||||
#endif
|
||||
|
||||
SIGRETTYPE sig_done(int sig)
|
||||
{
|
||||
signal(SIGALRM,sig_done);
|
||||
|
@@ -252,14 +252,8 @@ unsigned char key_out[KEY_TEST_NUM][8]={
|
||||
{0x05,0x04,0x4B,0x62,0xFA,0x52,0xD0,0x80},
|
||||
};
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int test(void );
|
||||
static int print_test_data(void );
|
||||
#else
|
||||
static int test();
|
||||
static int print_test_data();
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ret;
|
||||
|
@@ -81,7 +81,6 @@ typedef struct bf_key_st
|
||||
BF_LONG S[4*256];
|
||||
} BF_KEY;
|
||||
|
||||
#ifndef NOPROTO
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, unsigned char *data);
|
||||
void BF_ecb_encrypt(unsigned char *in,unsigned char *out,BF_KEY *key,
|
||||
@@ -96,19 +95,6 @@ void BF_ofb64_encrypt(unsigned char *in, unsigned char *out, long length,
|
||||
BF_KEY *schedule, unsigned char *ivec, int *num);
|
||||
const char *BF_options(void);
|
||||
|
||||
#else
|
||||
|
||||
void BF_set_key();
|
||||
void BF_ecb_encrypt();
|
||||
void BF_encrypt();
|
||||
void BF_decrypt();
|
||||
void BF_cbc_encrypt();
|
||||
void BF_cfb64_encrypt();
|
||||
void BF_ofb64_encrypt();
|
||||
const char *BF_options();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -65,8 +65,6 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/bio.h>
|
||||
|
||||
/* BIOerr(BIO_F_WSASTARTUP,BIO_R_WSASTARTUP ); */
|
||||
|
||||
#ifdef WIN16
|
||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||
#else
|
||||
@@ -96,16 +94,9 @@ static struct ghbn_cache_st
|
||||
unsigned long order;
|
||||
} ghbn_cache[GHBN_NUM];
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int get_ip(const char *str,unsigned char *ip);
|
||||
static void ghbn_free(struct hostent *a);
|
||||
static struct hostent *ghbn_dup(struct hostent *a);
|
||||
#else
|
||||
static int get_ip();
|
||||
static void ghbn_free();
|
||||
static struct hostent *ghbn_dup();
|
||||
#endif
|
||||
|
||||
int BIO_get_host_ip(const char *str, unsigned char *ip)
|
||||
{
|
||||
int i;
|
||||
|
@@ -62,7 +62,6 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int buffer_write(BIO *h,char *buf,int num);
|
||||
static int buffer_read(BIO *h,char *buf,int size);
|
||||
static int buffer_puts(BIO *h,char *str);
|
||||
@@ -70,16 +69,6 @@ static int buffer_gets(BIO *h,char *str,int size);
|
||||
static long buffer_ctrl(BIO *h,int cmd,long arg1,char *arg2);
|
||||
static int buffer_new(BIO *h);
|
||||
static int buffer_free(BIO *data);
|
||||
#else
|
||||
static int buffer_write();
|
||||
static int buffer_read();
|
||||
static int buffer_puts();
|
||||
static int buffer_gets();
|
||||
static long buffer_ctrl();
|
||||
static int buffer_new();
|
||||
static int buffer_free();
|
||||
#endif
|
||||
|
||||
#define DEFAULT_BUFFER_SIZE 1024
|
||||
|
||||
static BIO_METHOD methods_buffer=
|
||||
|
@@ -66,7 +66,6 @@
|
||||
/* BIO_put and BIO_get both add to the digest,
|
||||
* BIO_gets returns the digest */
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int nbiof_write(BIO *h,char *buf,int num);
|
||||
static int nbiof_read(BIO *h,char *buf,int size);
|
||||
static int nbiof_puts(BIO *h,char *str);
|
||||
@@ -74,16 +73,6 @@ static int nbiof_gets(BIO *h,char *str,int size);
|
||||
static long nbiof_ctrl(BIO *h,int cmd,long arg1,char *arg2);
|
||||
static int nbiof_new(BIO *h);
|
||||
static int nbiof_free(BIO *data);
|
||||
#else
|
||||
static int nbiof_write();
|
||||
static int nbiof_read();
|
||||
static int nbiof_puts();
|
||||
static int nbiof_gets();
|
||||
static long nbiof_ctrl();
|
||||
static int nbiof_new();
|
||||
static int nbiof_free();
|
||||
#endif
|
||||
|
||||
typedef struct nbio_test_st
|
||||
{
|
||||
/* only set if we sent a 'should retry' error */
|
||||
|
@@ -65,7 +65,6 @@
|
||||
/* BIO_put and BIO_get both add to the digest,
|
||||
* BIO_gets returns the digest */
|
||||
|
||||
#ifndef NOPROTO
|
||||
static int nullf_write(BIO *h,char *buf,int num);
|
||||
static int nullf_read(BIO *h,char *buf,int size);
|
||||
static int nullf_puts(BIO *h,char *str);
|
||||
@@ -73,16 +72,6 @@ static int nullf_gets(BIO *h,char *str,int size);
|
||||
static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2);
|
||||
static int nullf_new(BIO *h);
|
||||
static int nullf_free(BIO *data);
|
||||
#else
|
||||
static int nullf_write();
|
||||
static int nullf_read();
|
||||
static int nullf_puts();
|
||||
static int nullf_gets();
|
||||
static long nullf_ctrl();
|
||||
static int nullf_new();
|
||||
static int nullf_free();
|
||||
#endif
|
||||
|
||||
static BIO_METHOD methods_nullf=
|
||||
{
|
||||
BIO_TYPE_NULL_FILTER,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user