Make things static that should be. Declare stuff in headers that should be.

Fix warnings.
This commit is contained in:
Ben Laurie 2006-08-28 17:01:04 +00:00
parent 5776c3c4c6
commit 777c47acbe
11 changed files with 30 additions and 16 deletions

View file

@ -417,7 +417,7 @@ static void update_buflen(const BIGNUM *b, size_t *pbuflen)
*pbuflen = i;
}
int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
{
unsigned char *m=NULL;
int ret=0;

View file

@ -391,6 +391,10 @@ int ENGINE_register_pkey_meths(ENGINE *e);
void ENGINE_unregister_pkey_meths(ENGINE *e);
void ENGINE_register_all_pkey_meths(void);
int ENGINE_register_pkey_asn1_meths(ENGINE *e);
void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
void ENGINE_register_all_pkey_asn1_meths(void);
/* These functions register all support from the above categories. Note, use of
* these functions can result in static linkage of code your application may not
* need. If you only need a subset of functionality, consider using more

View file

@ -87,7 +87,7 @@ int ENGINE_register_pkey_asn1_meths(ENGINE *e)
return 1;
}
void ENGINE_register_all_pkey_asn1_meths()
void ENGINE_register_all_pkey_asn1_meths(void)
{
ENGINE *e;

View file

@ -876,6 +876,10 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
const unsigned char *salt, int saltlen, int iter,
int keylen, unsigned char *out);
int PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
const unsigned char *salt, int saltlen, int iter,
const EVP_MD *digest,
int keylen, unsigned char *out);
int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
int en_de);

View file

@ -62,8 +62,9 @@
#include <openssl/objects.h>
#include <openssl/x509.h>
int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey, int ver)
static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey,
int ver)
{
if (!EVP_DigestInit_ex(ctx, type, e))
return 0;

View file

@ -1027,6 +1027,9 @@ int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
void OBJ_sigid_free(void);
extern int obj_cleanup_defer;
void check_defer(int nid);
/* 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.

View file

@ -197,8 +197,8 @@ static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri,
}
int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen,
PKCS7_RECIP_INFO *ri, EVP_PKEY *pkey)
static int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen,
PKCS7_RECIP_INFO *ri, EVP_PKEY *pkey)
{
EVP_PKEY_CTX *pctx = NULL;
unsigned char *ek = NULL;

4
crypto/rsa/rsa_locl.h Normal file
View file

@ -0,0 +1,4 @@
extern int int_rsa_verify(int dtype, const unsigned char *m, size_t m_len,
unsigned char *rm, size_t *prm_len,
const unsigned char *sigbuf, size_t siglen,
RSA *rsa);

View file

@ -63,11 +63,7 @@
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include "evp_locl.h"
extern int int_rsa_verify(int dtype, const unsigned char *m, size_t m_len,
unsigned char *rm, size_t *prm_len,
const unsigned char *sigbuf, size_t siglen,
RSA *rsa);
#include "rsa_locl.h"
/* RSA pkey context structure */

View file

@ -62,6 +62,7 @@
#include <openssl/rsa.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include "rsa_locl.h"
/* Size of an SSL signature: MD5+SHA1 */
#define SSL_SIG_LENGTH 36
@ -142,10 +143,11 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
return(ret);
}
int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
unsigned char *rm, unsigned int *prm_len,
const unsigned char *sigbuf, unsigned int siglen,
RSA *rsa)
int int_rsa_verify(int dtype, const unsigned char *m,
unsigned int m_len,
unsigned char *rm, unsigned int *prm_len,
const unsigned char *sigbuf, unsigned int siglen,
RSA *rsa)
{
int i,ret=0,sigtype;
unsigned char *s;

View file

@ -803,7 +803,7 @@ static int ssl_cipher_process_rulestr(const char *rule_str,
unsigned long algorithms, mask, algo_strength, mask_strength;
const char *l, *start, *buf;
int j, multi, found, rule, retval, ok, buflen;
unsigned long cipher_id;
unsigned long cipher_id = 0;
char ch;
retval = 1;