提交 397f7038 编写于 作者: R Ralf S. Engelschall

Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow

-Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
-Wnested-externs -Winline'' with EGCS 1.1.2+
上级 884e8ec6
......@@ -5,6 +5,11 @@
Changes between 0.9.2b and 0.9.3
*) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall
-Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline'' with EGCS 1.1.2+
[Ralf S. Engelschall]
*) Various fixes to the EVP and PKCS#7 code. It may now be able to
handle PKCS#7 enveloped data properly.
[Sebastian Akerman <sak@parallelconsulting.com>, modified by Steve]
......
......@@ -78,6 +78,7 @@ EVP_CIPHER *enc;
#define CACERTS 0x10
int get_cert_chain(X509 *cert, STACK **chain);
int dump_cert_text (BIO *out, X509 *x);
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);
int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int passlen, int options);
......
......@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \
return (sizeof(ctext_ex) - 1);
int key1(RSA *key, unsigned char *c)
static int key1(RSA *key, unsigned char *c)
{
unsigned char n[] =
"\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
......@@ -74,7 +74,7 @@ int key1(RSA *key, unsigned char *c)
SetKey;
}
int key2(RSA *key, unsigned char *c)
static int key2(RSA *key, unsigned char *c)
{
unsigned char n[] =
"\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8"
......@@ -119,7 +119,7 @@ int key2(RSA *key, unsigned char *c)
SetKey;
}
int key3(RSA *key, unsigned char *c)
static int key3(RSA *key, unsigned char *c)
{
unsigned char n[] =
"\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
......@@ -191,7 +191,7 @@ int key3(RSA *key, unsigned char *c)
SetKey;
}
int pad_unknown(void)
static int pad_unknown(void)
{
unsigned long l;
while ((l = ERR_get_error()) != 0)
......
......@@ -178,10 +178,10 @@
})
#ifndef I386_ONLY
#define Endian_Reverse32(a) \
{ register unsigned int l=(a); \
{ register unsigned int ltmp=(a); \
asm ("bswapl %0" \
: "=r"(l) : "0"(l)); \
(a)=l; \
: "=r"(ltmp) : "0"(ltmp)); \
(a)=ltmp; \
}
#endif
#elif defined(__powerpc)
......
......@@ -900,6 +900,9 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
/* Password based encryption routines */
int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
unsigned char *salt, int saltlen, int iter, EVP_CIPHER_CTX *ctx,
int en_de);
int EVP_PBE_ALGOR_CipherInit(X509_ALGOR *algor, const char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de);
int EVP_PBE_alg_add(int nid, EVP_CIPHER *cipher, EVP_MD *md,
......
......@@ -60,7 +60,7 @@
#include "cryptlib.h"
#include <openssl/x509v3.h>
static ASN1_ENUMERATED *asn1_enumerated_new();
static ASN1_ENUMERATED *asn1_enumerated_new(void);
static ENUMERATED_NAMES crl_reasons[] = {
{0, "Unspecified", "unspecified"},
......
......@@ -60,7 +60,7 @@
#include "cryptlib.h"
#include <openssl/x509v3.h>
static ASN1_INTEGER *asn1_integer_new();
static ASN1_INTEGER *asn1_integer_new(void);
X509V3_EXT_METHOD v3_crl_num = {
NID_crl_number, 0,
......
......@@ -381,6 +381,7 @@ X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, c
X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, char *value);
int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509 *cert);
int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl);
int X509V3_add_value_bool_nf(char *name, int asn1_bool, STACK **extlist);
int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool);
int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint);
void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash);
......@@ -403,6 +404,7 @@ ASN1_INTEGER * s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value);
char * i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint);
char * i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint);
int X509V3_EXT_add(X509V3_EXT_METHOD *ext);
int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist);
int X509V3_EXT_add_alias(int nid_to, int nid_from);
void X509V3_EXT_cleanup(void);
......@@ -417,6 +419,7 @@ char *hex_to_string(unsigned char *buffer, long len);
unsigned char *string_to_hex(char *str, long *len);
int name_cmp(const char *name, const char *cmp);
void X509V3_EXT_val_prn(BIO *out, STACK *val, int indent, int ml);
int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent);
int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册