const char AES_version[]="AES" OPENSSL_VERSION_PTEXT;
-const char
-*AES_options(void) {
+const char *
+AES_options(void)
+{
#ifdef FULL_UNROLL
return "aes(full)";
#else
buffer_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_buffer(void)
+BIO_METHOD *
+BIO_f_buffer(void)
{
return (&methods_buffer);
}
linebuffer_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_linebuffer(void)
+BIO_METHOD *
+BIO_f_linebuffer(void)
{
return (&methods_linebuffer);
}
nbiof_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_nbio_test(void)
+BIO_METHOD *
+BIO_f_nbio_test(void)
{
return (&methods_nbiof);
}
nullf_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_null(void)
+BIO_METHOD *
+BIO_f_null(void)
{
return (&methods_nullf);
}
#include <openssl/bio.h>
#include <openssl/stack.h>
-BIO
-*BIO_new(BIO_METHOD *method)
+BIO *
+BIO_new(BIO_METHOD *method)
{
BIO *ret = NULL;
return (BIO_ctrl(b, cmd, larg, (char *)&i));
}
-char
-*BIO_ptr_ctrl(BIO *b, int cmd, long larg)
+char *
+BIO_ptr_ctrl(BIO *b, int cmd, long larg)
{
char *p = NULL;
/* put the 'bio' on the end of b's list of operators */
-BIO
-*BIO_push(BIO *b, BIO *bio)
+BIO *
+BIO_push(BIO *b, BIO *bio)
{
BIO *lb;
}
/* Remove the first and return the rest */
-BIO
-*BIO_pop(BIO *b)
+BIO *
+BIO_pop(BIO *b)
{
BIO *ret;
return (ret);
}
-BIO
-*BIO_get_retry_BIO(BIO *bio, int *reason)
+BIO *
+BIO_get_retry_BIO(BIO *bio, int *reason)
{
BIO *b, *last;
return (bio->retry_reason);
}
-BIO
-*BIO_find_type(BIO *bio, int type)
+BIO *
+BIO_find_type(BIO *bio, int type)
{
int mt, mask;
return (NULL);
}
-BIO
-*BIO_next(BIO *b)
+BIO *
+BIO_next(BIO *b)
{
if (!b)
return NULL;
}
}
-BIO
-*BIO_dup_chain(BIO *in)
+BIO *
+BIO_dup_chain(BIO *in)
{
BIO *ret = NULL, *eoc = NULL, *bio, *new_bio;
return (CRYPTO_set_ex_data(&(bio->ex_data), idx, data));
}
-void
-*BIO_get_ex_data(BIO *bio, int idx)
+void *
+BIO_get_ex_data(BIO *bio, int idx)
{
return (CRYPTO_get_ex_data(&(bio->ex_data), idx));
}
NULL,
};
-BIO_METHOD
-*BIO_s_accept(void)
+BIO_METHOD *
+BIO_s_accept(void)
{
return (&methods_acceptp);
}
return (1);
}
-static BIO_ACCEPT
-*BIO_ACCEPT_new(void)
+static BIO_ACCEPT *
+BIO_ACCEPT_new(void)
{
BIO_ACCEPT *ret;
return (ret);
}
-BIO
-*BIO_new_accept(char *str)
+BIO *
+BIO_new_accept(char *str)
{
BIO *ret;
NULL /* no bio_callback_ctrl */
};
-BIO_METHOD
-*BIO_s_bio(void)
+BIO_METHOD *
+BIO_s_bio(void)
{
return &methods_biop;
}
return (ret);
}
-BIO_CONNECT
-*BIO_CONNECT_new(void)
+BIO_CONNECT *
+BIO_CONNECT_new(void)
{
BIO_CONNECT *ret;
free(a);
}
-BIO_METHOD
-*BIO_s_connect(void)
+BIO_METHOD *
+BIO_s_connect(void)
{
return (&methods_connectp);
}
return (ret);
}
-BIO
-*BIO_new_connect(char *str)
+BIO *
+BIO_new_connect(char *str)
{
BIO *ret;
} bio_dgram_sctp_data;
#endif
-BIO_METHOD
-*BIO_s_datagram(void)
+BIO_METHOD *
+BIO_s_datagram(void)
{
return (&methods_dgramp);
}
-BIO
-*BIO_new_dgram(int fd, int close_flag)
+BIO *
+BIO_new_dgram(int fd, int close_flag)
{
BIO *ret;
}
#ifndef OPENSSL_NO_SCTP
-BIO_METHOD
-*BIO_s_datagram_sctp(void)
+BIO_METHOD *
+BIO_s_datagram_sctp(void)
{
return (&methods_dgramp_sctp);
}
-BIO
-*BIO_new_dgram_sctp(int fd, int close_flag)
+BIO *
+BIO_new_dgram_sctp(int fd, int close_flag)
{
BIO *bio;
int ret, optval = 20000;
NULL,
};
-BIO_METHOD
-*BIO_s_fd(void)
+BIO_METHOD *
+BIO_s_fd(void)
{
return (&methods_fdp);
}
-BIO
-*BIO_new_fd(int fd, int close_flag)
+BIO *
+BIO_new_fd(int fd, int close_flag)
{
BIO *ret;
ret = BIO_new(BIO_s_fd());
NULL,
};
-BIO
-*BIO_new_file(const char *filename, const char *mode)
+BIO *
+BIO_new_file(const char *filename, const char *mode)
{
BIO *ret;
FILE *file = NULL;
return (ret);
}
-BIO
-*BIO_new_fp(FILE *stream, int close_flag)
+BIO *
+BIO_new_fp(FILE *stream, int close_flag)
{
BIO *ret;
return (ret);
}
-BIO_METHOD
-*BIO_s_file(void)
+BIO_METHOD *
+BIO_s_file(void)
{
return (&methods_filep);
}
NULL,
};
-BIO_METHOD
-*BIO_s_log(void)
+BIO_METHOD *
+BIO_s_log(void)
{
return (&methods_slg);
}
/* bio->num is used to hold the value to return on 'empty', if it is
* 0, should_retry is not set */
-BIO_METHOD
-*BIO_s_mem(void)
+BIO_METHOD *
+BIO_s_mem(void)
{
return (&mem_method);
}
-BIO
-*BIO_new_mem_buf(void *buf, int len)
+BIO *
+BIO_new_mem_buf(void *buf, int len)
{
BIO *ret;
BUF_MEM *b;
NULL,
};
-BIO_METHOD
-*BIO_s_null(void)
+BIO_METHOD *
+BIO_s_null(void)
{
return (&null_method);
}
NULL,
};
-BIO_METHOD
-*BIO_s_socket(void)
+BIO_METHOD *
+BIO_s_socket(void)
{
return (&methods_sockp);
}
-BIO
-*BIO_new_socket(int fd, int close_flag)
+BIO *
+BIO_new_socket(int fd, int close_flag)
{
BIO *ret;
#include "cryptlib.h"
#include <openssl/safestack.h>
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
-static double SSLeay_MSVC5_hack = 0.0; /* and for VC1.5 */
-#endif
-
DECLARE_STACK_OF(CRYPTO_dynlock)
/* real #defines in crypto.h, keep these upto date */
}
}
-struct CRYPTO_dynlock_value
-*CRYPTO_get_dynlock_value(int i)
+struct CRYPTO_dynlock_value *
+CRYPTO_get_dynlock_value(int i)
{
CRYPTO_dynlock *pointer = NULL;
if (i)
return NULL;
}
-struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(
+struct CRYPTO_dynlock_value *
+(*CRYPTO_get_dynlock_create_callback(void))(
const char *file, int line)
{
return (dynlock_create_callback);
const unsigned char *src = (void *)&id->ptr;
unsigned char snum = sizeof(id->ptr);
while (snum--)
- accum += *(src++) * hash_coeffs[(snum + dnum) & 7];
+ accum += *(src++) * hash_coeffs[(snum + dnum) & 7];
accum += dnum;
*(dest++) = accum & 255;
}
return (ret);
}
-const char
-*CRYPTO_get_lock_name(int type)
+const char *
+CRYPTO_get_lock_name(int type)
{
if (type < 0)
return("dynamic");
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
unsigned int OPENSSL_ia32cap_P[2];
-unsigned long
-*OPENSSL_ia32cap_loc(void)
+unsigned long *
+OPENSSL_ia32cap_loc(void)
{
if (sizeof(long) == 4)
/*
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) && !defined(I386_ONLY)
#define OPENSSL_CPUID_SETUP
-#if defined(_WIN32)
-typedef unsigned __int64 IA32CAP;
-#else
typedef unsigned long long IA32CAP;
-#endif
void
OPENSSL_cpuid_setup(void)
{
trigger = 1;
if ((env = getenv("OPENSSL_ia32cap"))) {
int off = (env[0]=='~') ? 1 : 0;
-#if defined(_WIN32)
- if (!sscanf(env+off, "%I64i", &vec)) vec = strtoul(env+off, NULL, 0);
-#else
- if (!sscanf(env+off, "%lli",(long long *)&vec)) vec = strtoul(env+off, NULL, 0);
-#endif
+ if (!sscanf(env+off, "%lli",(long long *)&vec))
+ vec = strtoul(env+off, NULL, 0);
if (off)
vec = OPENSSL_ia32_cpuid()&~vec;
} else
}
#endif
int OPENSSL_NONPIC_relocated = 0;
+
#if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ)
void
-OPENSSL_cpuid_setup(void) {}
+OPENSSL_cpuid_setup(void)
+{
+}
#endif
-void OPENSSL_showfatal(const char *fmta, ...)
+void
+OPENSSL_showfatal(const char *fmta, ...)
{
va_list ap;
va_end (ap);
}
-int OPENSSL_isservice(void)
+int
+OPENSSL_isservice(void)
{
return 0;
}
abort();
}
-void *OPENSSL_stderr(void)
+void *
+OPENSSL_stderr(void)
{
return stderr;
}
#include "cryptlib.h"
-const char
-*SSLeay_version(int t)
+const char *
+SSLeay_version(int t)
{
if (t == SSLEAY_VERSION)
return OPENSSL_VERSION_TEXT;
#define IMPL_CHECK if(!impl) impl_check();
/* API functions to get/set the "ex_data" implementation */
-const CRYPTO_EX_DATA_IMPL
-*CRYPTO_get_ex_data_implementation(void)
+const CRYPTO_EX_DATA_IMPL *
+CRYPTO_get_ex_data_implementation(void)
{
IMPL_CHECK
return impl;
/* Return the EX_CLASS_ITEM from the "ex_data" hash table that corresponds to a
* given class. Handles locking. */
-static EX_CLASS_ITEM
-*def_get_class(int class_index)
+static EX_CLASS_ITEM *
+def_get_class(int class_index)
{
EX_CLASS_ITEM d, *p, *gen;
EX_DATA_CHECK(return NULL;)
/* For a given CRYPTO_EX_DATA_ variable, get the value corresponding to a
* particular index in the class used by this variable */
-void
-*CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
+void *
+CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
{
if (ad->sk == NULL)
return (0);
NULL, /* get_by_alias */
};
-X509_LOOKUP_METHOD
-*X509_LOOKUP_hash_dir(void)
+X509_LOOKUP_METHOD *
+X509_LOOKUP_hash_dir(void)
{
return (&x509_dir_lookup);
}
NULL, /* get_by_alias */
};
-X509_LOOKUP_METHOD
-*X509_LOOKUP_file(void)
+X509_LOOKUP_METHOD *
+X509_LOOKUP_file(void)
{
return (&x509_file_lookup);
}
}
#ifndef OPENSSL_NO_FP_API
-X509
-*d2i_X509_fp(FILE *fp, X509 **x509)
+X509 *
+d2i_X509_fp(FILE *fp, X509 **x509)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509), fp, x509);
}
}
#endif
-X509
-*d2i_X509_bio(BIO *bp, X509 **x509)
+X509 *
+d2i_X509_bio(BIO *bp, X509 **x509)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), bp, x509);
}
}
#ifndef OPENSSL_NO_FP_API
-X509_CRL
-*d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
+X509_CRL *
+d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl);
}
}
#endif
-X509_CRL
-*d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
+X509_CRL *
+d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl);
}
}
#ifndef OPENSSL_NO_FP_API
-PKCS7
-*d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
+PKCS7 *
+d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS7), fp, p7);
}
}
#endif
-PKCS7
-*d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
+PKCS7 *
+d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS7), bp, p7);
}
}
#ifndef OPENSSL_NO_FP_API
-X509_REQ
-*d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
+X509_REQ *
+d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_REQ), fp, req);
}
}
#endif
-X509_REQ
-*d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
+X509_REQ *
+d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_REQ), bp, req);
}
#ifndef OPENSSL_NO_RSA
#ifndef OPENSSL_NO_FP_API
-RSA
-*d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
}
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
}
-RSA
-*d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa);
}
-RSA
-*d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
{
return ASN1_d2i_fp((void *(*)(void))RSA_new,
(D2I_OF(void))d2i_RSA_PUBKEY, fp, (void **)rsa);
}
#endif
-RSA
-*d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
}
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
}
-RSA
-*d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa);
}
-RSA
-*d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
{
return ASN1_d2i_bio_of(RSA, RSA_new, d2i_RSA_PUBKEY, bp, rsa);
}
#ifndef OPENSSL_NO_DSA
#ifndef OPENSSL_NO_FP_API
-DSA
-*d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
+DSA *
+d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
{
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSAPrivateKey, fp, dsa);
}
return ASN1_i2d_fp_of_const(DSA, i2d_DSAPrivateKey, fp, dsa);
}
-DSA
-*d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
+DSA *
+d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
{
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSA_PUBKEY, fp, dsa);
}
}
#endif
-DSA
-*d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa)
+DSA *
+d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa)
{
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAPrivateKey, bp, dsa);
}
return ASN1_i2d_bio_of_const(DSA, i2d_DSAPrivateKey, bp, dsa);
}
-DSA
-*d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
+DSA *
+d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
{
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSA_PUBKEY, bp, dsa);
}
#ifndef OPENSSL_NO_EC
#ifndef OPENSSL_NO_FP_API
-EC_KEY
-*d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey)
+EC_KEY *
+d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey)
{
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, fp, eckey);
}
return ASN1_i2d_fp_of(EC_KEY, i2d_EC_PUBKEY, fp, eckey);
}
-EC_KEY
-*d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
+EC_KEY *
+d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
{
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, fp, eckey);
}
return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey);
}
#endif
-EC_KEY
-*d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey)
+EC_KEY *
+d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey)
{
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, bp, eckey);
}
return ASN1_i2d_bio_of(EC_KEY, i2d_EC_PUBKEY, bp, ecdsa);
}
-EC_KEY
-*d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
+EC_KEY *
+d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
{
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, bp, eckey);
}
#ifndef OPENSSL_NO_FP_API
-X509_SIG
-*d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
+X509_SIG *
+d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
{
return ASN1_d2i_fp_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, fp, p8);
}
}
#endif
-X509_SIG
-*d2i_PKCS8_bio(BIO *bp, X509_SIG **p8)
+X509_SIG *
+d2i_PKCS8_bio(BIO *bp, X509_SIG **p8)
{
return ASN1_d2i_bio_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, bp, p8);
}
}
#ifndef OPENSSL_NO_FP_API
-PKCS8_PRIV_KEY_INFO
-*d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
+PKCS8_PRIV_KEY_INFO *
+d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
PKCS8_PRIV_KEY_INFO **p8inf)
{
return ASN1_d2i_fp_of(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_new,
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PrivateKey, fp, pkey);
}
-EVP_PKEY
-*d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
{
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey,
fp, a);
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PUBKEY, fp, pkey);
}
-EVP_PKEY
-*d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
{
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, fp, a);
}
#endif
-PKCS8_PRIV_KEY_INFO
-*d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
+PKCS8_PRIV_KEY_INFO *
+d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
PKCS8_PRIV_KEY_INFO **p8inf)
{
return ASN1_d2i_bio_of(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_new,
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PrivateKey, bp, pkey);
}
-EVP_PKEY
-*d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
{
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey, bp, a);
}
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PUBKEY, bp, pkey);
}
-EVP_PKEY
-*d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a)
{
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, bp, a);
}
const char AES_version[]="AES" OPENSSL_VERSION_PTEXT;
-const char
-*AES_options(void) {
+const char *
+AES_options(void)
+{
#ifdef FULL_UNROLL
return "aes(full)";
#else
buffer_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_buffer(void)
+BIO_METHOD *
+BIO_f_buffer(void)
{
return (&methods_buffer);
}
linebuffer_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_linebuffer(void)
+BIO_METHOD *
+BIO_f_linebuffer(void)
{
return (&methods_linebuffer);
}
nbiof_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_nbio_test(void)
+BIO_METHOD *
+BIO_f_nbio_test(void)
{
return (&methods_nbiof);
}
nullf_callback_ctrl,
};
-BIO_METHOD
-*BIO_f_null(void)
+BIO_METHOD *
+BIO_f_null(void)
{
return (&methods_nullf);
}
#include <openssl/bio.h>
#include <openssl/stack.h>
-BIO
-*BIO_new(BIO_METHOD *method)
+BIO *
+BIO_new(BIO_METHOD *method)
{
BIO *ret = NULL;
return (BIO_ctrl(b, cmd, larg, (char *)&i));
}
-char
-*BIO_ptr_ctrl(BIO *b, int cmd, long larg)
+char *
+BIO_ptr_ctrl(BIO *b, int cmd, long larg)
{
char *p = NULL;
/* put the 'bio' on the end of b's list of operators */
-BIO
-*BIO_push(BIO *b, BIO *bio)
+BIO *
+BIO_push(BIO *b, BIO *bio)
{
BIO *lb;
}
/* Remove the first and return the rest */
-BIO
-*BIO_pop(BIO *b)
+BIO *
+BIO_pop(BIO *b)
{
BIO *ret;
return (ret);
}
-BIO
-*BIO_get_retry_BIO(BIO *bio, int *reason)
+BIO *
+BIO_get_retry_BIO(BIO *bio, int *reason)
{
BIO *b, *last;
return (bio->retry_reason);
}
-BIO
-*BIO_find_type(BIO *bio, int type)
+BIO *
+BIO_find_type(BIO *bio, int type)
{
int mt, mask;
return (NULL);
}
-BIO
-*BIO_next(BIO *b)
+BIO *
+BIO_next(BIO *b)
{
if (!b)
return NULL;
}
}
-BIO
-*BIO_dup_chain(BIO *in)
+BIO *
+BIO_dup_chain(BIO *in)
{
BIO *ret = NULL, *eoc = NULL, *bio, *new_bio;
return (CRYPTO_set_ex_data(&(bio->ex_data), idx, data));
}
-void
-*BIO_get_ex_data(BIO *bio, int idx)
+void *
+BIO_get_ex_data(BIO *bio, int idx)
{
return (CRYPTO_get_ex_data(&(bio->ex_data), idx));
}
NULL,
};
-BIO_METHOD
-*BIO_s_accept(void)
+BIO_METHOD *
+BIO_s_accept(void)
{
return (&methods_acceptp);
}
return (1);
}
-static BIO_ACCEPT
-*BIO_ACCEPT_new(void)
+static BIO_ACCEPT *
+BIO_ACCEPT_new(void)
{
BIO_ACCEPT *ret;
return (ret);
}
-BIO
-*BIO_new_accept(char *str)
+BIO *
+BIO_new_accept(char *str)
{
BIO *ret;
NULL /* no bio_callback_ctrl */
};
-BIO_METHOD
-*BIO_s_bio(void)
+BIO_METHOD *
+BIO_s_bio(void)
{
return &methods_biop;
}
return (ret);
}
-BIO_CONNECT
-*BIO_CONNECT_new(void)
+BIO_CONNECT *
+BIO_CONNECT_new(void)
{
BIO_CONNECT *ret;
free(a);
}
-BIO_METHOD
-*BIO_s_connect(void)
+BIO_METHOD *
+BIO_s_connect(void)
{
return (&methods_connectp);
}
return (ret);
}
-BIO
-*BIO_new_connect(char *str)
+BIO *
+BIO_new_connect(char *str)
{
BIO *ret;
} bio_dgram_sctp_data;
#endif
-BIO_METHOD
-*BIO_s_datagram(void)
+BIO_METHOD *
+BIO_s_datagram(void)
{
return (&methods_dgramp);
}
-BIO
-*BIO_new_dgram(int fd, int close_flag)
+BIO *
+BIO_new_dgram(int fd, int close_flag)
{
BIO *ret;
}
#ifndef OPENSSL_NO_SCTP
-BIO_METHOD
-*BIO_s_datagram_sctp(void)
+BIO_METHOD *
+BIO_s_datagram_sctp(void)
{
return (&methods_dgramp_sctp);
}
-BIO
-*BIO_new_dgram_sctp(int fd, int close_flag)
+BIO *
+BIO_new_dgram_sctp(int fd, int close_flag)
{
BIO *bio;
int ret, optval = 20000;
NULL,
};
-BIO_METHOD
-*BIO_s_fd(void)
+BIO_METHOD *
+BIO_s_fd(void)
{
return (&methods_fdp);
}
-BIO
-*BIO_new_fd(int fd, int close_flag)
+BIO *
+BIO_new_fd(int fd, int close_flag)
{
BIO *ret;
ret = BIO_new(BIO_s_fd());
NULL,
};
-BIO
-*BIO_new_file(const char *filename, const char *mode)
+BIO *
+BIO_new_file(const char *filename, const char *mode)
{
BIO *ret;
FILE *file = NULL;
return (ret);
}
-BIO
-*BIO_new_fp(FILE *stream, int close_flag)
+BIO *
+BIO_new_fp(FILE *stream, int close_flag)
{
BIO *ret;
return (ret);
}
-BIO_METHOD
-*BIO_s_file(void)
+BIO_METHOD *
+BIO_s_file(void)
{
return (&methods_filep);
}
NULL,
};
-BIO_METHOD
-*BIO_s_log(void)
+BIO_METHOD *
+BIO_s_log(void)
{
return (&methods_slg);
}
/* bio->num is used to hold the value to return on 'empty', if it is
* 0, should_retry is not set */
-BIO_METHOD
-*BIO_s_mem(void)
+BIO_METHOD *
+BIO_s_mem(void)
{
return (&mem_method);
}
-BIO
-*BIO_new_mem_buf(void *buf, int len)
+BIO *
+BIO_new_mem_buf(void *buf, int len)
{
BIO *ret;
BUF_MEM *b;
NULL,
};
-BIO_METHOD
-*BIO_s_null(void)
+BIO_METHOD *
+BIO_s_null(void)
{
return (&null_method);
}
NULL,
};
-BIO_METHOD
-*BIO_s_socket(void)
+BIO_METHOD *
+BIO_s_socket(void)
{
return (&methods_sockp);
}
-BIO
-*BIO_new_socket(int fd, int close_flag)
+BIO *
+BIO_new_socket(int fd, int close_flag)
{
BIO *ret;
#include "cryptlib.h"
#include <openssl/safestack.h>
-#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
-static double SSLeay_MSVC5_hack = 0.0; /* and for VC1.5 */
-#endif
-
DECLARE_STACK_OF(CRYPTO_dynlock)
/* real #defines in crypto.h, keep these upto date */
}
}
-struct CRYPTO_dynlock_value
-*CRYPTO_get_dynlock_value(int i)
+struct CRYPTO_dynlock_value *
+CRYPTO_get_dynlock_value(int i)
{
CRYPTO_dynlock *pointer = NULL;
if (i)
return NULL;
}
-struct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(
+struct CRYPTO_dynlock_value *
+(*CRYPTO_get_dynlock_create_callback(void))(
const char *file, int line)
{
return (dynlock_create_callback);
const unsigned char *src = (void *)&id->ptr;
unsigned char snum = sizeof(id->ptr);
while (snum--)
- accum += *(src++) * hash_coeffs[(snum + dnum) & 7];
+ accum += *(src++) * hash_coeffs[(snum + dnum) & 7];
accum += dnum;
*(dest++) = accum & 255;
}
return (ret);
}
-const char
-*CRYPTO_get_lock_name(int type)
+const char *
+CRYPTO_get_lock_name(int type)
{
if (type < 0)
return("dynamic");
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
unsigned int OPENSSL_ia32cap_P[2];
-unsigned long
-*OPENSSL_ia32cap_loc(void)
+unsigned long *
+OPENSSL_ia32cap_loc(void)
{
if (sizeof(long) == 4)
/*
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) && !defined(I386_ONLY)
#define OPENSSL_CPUID_SETUP
-#if defined(_WIN32)
-typedef unsigned __int64 IA32CAP;
-#else
typedef unsigned long long IA32CAP;
-#endif
void
OPENSSL_cpuid_setup(void)
{
trigger = 1;
if ((env = getenv("OPENSSL_ia32cap"))) {
int off = (env[0]=='~') ? 1 : 0;
-#if defined(_WIN32)
- if (!sscanf(env+off, "%I64i", &vec)) vec = strtoul(env+off, NULL, 0);
-#else
- if (!sscanf(env+off, "%lli",(long long *)&vec)) vec = strtoul(env+off, NULL, 0);
-#endif
+ if (!sscanf(env+off, "%lli",(long long *)&vec))
+ vec = strtoul(env+off, NULL, 0);
if (off)
vec = OPENSSL_ia32_cpuid()&~vec;
} else
}
#endif
int OPENSSL_NONPIC_relocated = 0;
+
#if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ)
void
-OPENSSL_cpuid_setup(void) {}
+OPENSSL_cpuid_setup(void)
+{
+}
#endif
-void OPENSSL_showfatal(const char *fmta, ...)
+void
+OPENSSL_showfatal(const char *fmta, ...)
{
va_list ap;
va_end (ap);
}
-int OPENSSL_isservice(void)
+int
+OPENSSL_isservice(void)
{
return 0;
}
abort();
}
-void *OPENSSL_stderr(void)
+void *
+OPENSSL_stderr(void)
{
return stderr;
}
#include "cryptlib.h"
-const char
-*SSLeay_version(int t)
+const char *
+SSLeay_version(int t)
{
if (t == SSLEAY_VERSION)
return OPENSSL_VERSION_TEXT;
#define IMPL_CHECK if(!impl) impl_check();
/* API functions to get/set the "ex_data" implementation */
-const CRYPTO_EX_DATA_IMPL
-*CRYPTO_get_ex_data_implementation(void)
+const CRYPTO_EX_DATA_IMPL *
+CRYPTO_get_ex_data_implementation(void)
{
IMPL_CHECK
return impl;
/* Return the EX_CLASS_ITEM from the "ex_data" hash table that corresponds to a
* given class. Handles locking. */
-static EX_CLASS_ITEM
-*def_get_class(int class_index)
+static EX_CLASS_ITEM *
+def_get_class(int class_index)
{
EX_CLASS_ITEM d, *p, *gen;
EX_DATA_CHECK(return NULL;)
/* For a given CRYPTO_EX_DATA_ variable, get the value corresponding to a
* particular index in the class used by this variable */
-void
-*CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
+void *
+CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
{
if (ad->sk == NULL)
return (0);
NULL, /* get_by_alias */
};
-X509_LOOKUP_METHOD
-*X509_LOOKUP_hash_dir(void)
+X509_LOOKUP_METHOD *
+X509_LOOKUP_hash_dir(void)
{
return (&x509_dir_lookup);
}
NULL, /* get_by_alias */
};
-X509_LOOKUP_METHOD
-*X509_LOOKUP_file(void)
+X509_LOOKUP_METHOD *
+X509_LOOKUP_file(void)
{
return (&x509_file_lookup);
}
}
#ifndef OPENSSL_NO_FP_API
-X509
-*d2i_X509_fp(FILE *fp, X509 **x509)
+X509 *
+d2i_X509_fp(FILE *fp, X509 **x509)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509), fp, x509);
}
}
#endif
-X509
-*d2i_X509_bio(BIO *bp, X509 **x509)
+X509 *
+d2i_X509_bio(BIO *bp, X509 **x509)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), bp, x509);
}
}
#ifndef OPENSSL_NO_FP_API
-X509_CRL
-*d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
+X509_CRL *
+d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl);
}
}
#endif
-X509_CRL
-*d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
+X509_CRL *
+d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl);
}
}
#ifndef OPENSSL_NO_FP_API
-PKCS7
-*d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
+PKCS7 *
+d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS7), fp, p7);
}
}
#endif
-PKCS7
-*d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
+PKCS7 *
+d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS7), bp, p7);
}
}
#ifndef OPENSSL_NO_FP_API
-X509_REQ
-*d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
+X509_REQ *
+d2i_X509_REQ_fp(FILE *fp, X509_REQ **req)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_REQ), fp, req);
}
}
#endif
-X509_REQ
-*d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
+X509_REQ *
+d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_REQ), bp, req);
}
#ifndef OPENSSL_NO_RSA
#ifndef OPENSSL_NO_FP_API
-RSA
-*d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
}
return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa);
}
-RSA
-*d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
{
return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa);
}
-RSA
-*d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
+RSA *
+d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
{
return ASN1_d2i_fp((void *(*)(void))RSA_new,
(D2I_OF(void))d2i_RSA_PUBKEY, fp, (void **)rsa);
}
#endif
-RSA
-*d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
}
return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa);
}
-RSA
-*d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
{
return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa);
}
-RSA
-*d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
+RSA *
+d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
{
return ASN1_d2i_bio_of(RSA, RSA_new, d2i_RSA_PUBKEY, bp, rsa);
}
#ifndef OPENSSL_NO_DSA
#ifndef OPENSSL_NO_FP_API
-DSA
-*d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
+DSA *
+d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa)
{
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSAPrivateKey, fp, dsa);
}
return ASN1_i2d_fp_of_const(DSA, i2d_DSAPrivateKey, fp, dsa);
}
-DSA
-*d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
+DSA *
+d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
{
return ASN1_d2i_fp_of(DSA, DSA_new, d2i_DSA_PUBKEY, fp, dsa);
}
}
#endif
-DSA
-*d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa)
+DSA *
+d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa)
{
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAPrivateKey, bp, dsa);
}
return ASN1_i2d_bio_of_const(DSA, i2d_DSAPrivateKey, bp, dsa);
}
-DSA
-*d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
+DSA *
+d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
{
return ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSA_PUBKEY, bp, dsa);
}
#ifndef OPENSSL_NO_EC
#ifndef OPENSSL_NO_FP_API
-EC_KEY
-*d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey)
+EC_KEY *
+d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey)
{
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, fp, eckey);
}
return ASN1_i2d_fp_of(EC_KEY, i2d_EC_PUBKEY, fp, eckey);
}
-EC_KEY
-*d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
+EC_KEY *
+d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey)
{
return ASN1_d2i_fp_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, fp, eckey);
}
return ASN1_i2d_fp_of(EC_KEY, i2d_ECPrivateKey, fp, eckey);
}
#endif
-EC_KEY
-*d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey)
+EC_KEY *
+d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey)
{
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_EC_PUBKEY, bp, eckey);
}
return ASN1_i2d_bio_of(EC_KEY, i2d_EC_PUBKEY, bp, ecdsa);
}
-EC_KEY
-*d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
+EC_KEY *
+d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey)
{
return ASN1_d2i_bio_of(EC_KEY, EC_KEY_new, d2i_ECPrivateKey, bp, eckey);
}
#ifndef OPENSSL_NO_FP_API
-X509_SIG
-*d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
+X509_SIG *
+d2i_PKCS8_fp(FILE *fp, X509_SIG **p8)
{
return ASN1_d2i_fp_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, fp, p8);
}
}
#endif
-X509_SIG
-*d2i_PKCS8_bio(BIO *bp, X509_SIG **p8)
+X509_SIG *
+d2i_PKCS8_bio(BIO *bp, X509_SIG **p8)
{
return ASN1_d2i_bio_of(X509_SIG, X509_SIG_new, d2i_X509_SIG, bp, p8);
}
}
#ifndef OPENSSL_NO_FP_API
-PKCS8_PRIV_KEY_INFO
-*d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
+PKCS8_PRIV_KEY_INFO *
+d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
PKCS8_PRIV_KEY_INFO **p8inf)
{
return ASN1_d2i_fp_of(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_new,
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PrivateKey, fp, pkey);
}
-EVP_PKEY
-*d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a)
{
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey,
fp, a);
return ASN1_i2d_fp_of(EVP_PKEY, i2d_PUBKEY, fp, pkey);
}
-EVP_PKEY
-*d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
{
return ASN1_d2i_fp_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, fp, a);
}
#endif
-PKCS8_PRIV_KEY_INFO
-*d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
+PKCS8_PRIV_KEY_INFO *
+d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
PKCS8_PRIV_KEY_INFO **p8inf)
{
return ASN1_d2i_bio_of(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO_new,
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PrivateKey, bp, pkey);
}
-EVP_PKEY
-*d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a)
{
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_AutoPrivateKey, bp, a);
}
return ASN1_i2d_bio_of(EVP_PKEY, i2d_PUBKEY, bp, pkey);
}
-EVP_PKEY
-*d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a)
+EVP_PKEY *
+d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a)
{
return ASN1_d2i_bio_of(EVP_PKEY, EVP_PKEY_new, d2i_PUBKEY, bp, a);
}