static const SSL_METHOD *dtls1_get_client_method(int ver);
static int dtls1_get_hello_verify(SSL *s);
-static const SSL_METHOD
-*dtls1_get_client_method(int ver)
+static const SSL_METHOD *
+dtls1_get_client_method(int ver)
{
if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER)
return (DTLSv1_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_client_method,
* to explicitly list their SSL_* codes. Currently RC4 is the only one
* available, but if new ones emerge, they will have to be added...
*/
-const SSL_CIPHER
-*dtls1_get_cipher(unsigned int u)
+const SSL_CIPHER *
+dtls1_get_cipher(unsigned int u)
{
const SSL_CIPHER *ciph = ssl3_get_cipher(u);
#include "ssl_locl.h"
static const SSL_METHOD *dtls1_get_method(int ver);
-static const SSL_METHOD
-*dtls1_get_method(int ver)
+static const SSL_METHOD *
+dtls1_get_method(int ver)
{
if (ver == DTLS1_VERSION)
return (DTLSv1_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_method,
*
*/
/*
- DTLS code by Eric Rescorla <ekr@rtfm.com>
-
- Copyright (C) 2006, Network Resonance, Inc.
- Copyright (C) 2011, RTFM, Inc.
-*/
+ * DTLS code by Eric Rescorla <ekr@rtfm.com>
+ *
+ * Copyright (C) 2006, Network Resonance, Inc.
+ * Copyright (C) 2011, RTFM, Inc.
+ */
#include <stdio.h>
#include <openssl/objects.h>
}
-STACK_OF(SRTP_PROTECTION_PROFILE)
-*SSL_get_srtp_profiles(SSL *s)
+STACK_OF(SRTP_PROTECTION_PROFILE) *
+SSL_get_srtp_profiles(SSL *s)
{
if (s != NULL) {
if (s->srtp_profiles != NULL) {
return NULL;
}
-SRTP_PROTECTION_PROFILE
-*SSL_get_selected_srtp_profile(SSL *s)
+SRTP_PROTECTION_PROFILE *
+SSL_get_selected_srtp_profile(SSL *s)
{
return s->srtp_profile;
}
static const SSL_METHOD *dtls1_get_server_method(int ver);
static int dtls1_send_hello_verify_request(SSL *s);
-static const SSL_METHOD
-*dtls1_get_server_method(int ver)
+static const SSL_METHOD *
+dtls1_get_server_method(int ver)
{
if (ver == DTLS1_VERSION)
return (DTLSv1_server_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_server_method,
static const SSL_METHOD *ssl23_get_client_method(int ver);
static int ssl23_client_hello(SSL *s);
static int ssl23_get_server_hello(SSL *s);
-static const SSL_METHOD
-*ssl23_get_client_method(int ver)
+static const SSL_METHOD *
+ssl23_get_client_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_client_method());
- else if (ver == TLS1_VERSION)
+ if (ver == TLS1_VERSION)
return (TLSv1_client_method());
- else if (ver == TLS1_1_VERSION)
+ if (ver == TLS1_1_VERSION)
return (TLSv1_1_client_method());
- else if (ver == TLS1_2_VERSION)
+ if (ver == TLS1_2_VERSION)
return (TLSv1_2_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl23_meth_func(SSLv23_client_method,
int
ssl23_num_ciphers(void)
{
- return(ssl3_num_ciphers());
+ return (ssl3_num_ciphers());
}
-const SSL_CIPHER
-*ssl23_get_cipher(unsigned int u)
+const SSL_CIPHER *
+ssl23_get_cipher(unsigned int u)
{
unsigned int uu = ssl3_num_ciphers();
/* This function needs to check if the ciphers required are actually
* available */
-const SSL_CIPHER
-*ssl23_get_cipher_by_char(const unsigned char *p)
+const SSL_CIPHER *
+ssl23_get_cipher_by_char(const unsigned char *p)
{
const SSL_CIPHER *cp;
{
if (ver == SSL3_VERSION)
return (SSLv3_server_method());
- else if (ver == TLS1_VERSION)
+ if (ver == TLS1_VERSION)
return (TLSv1_server_method());
- else if (ver == TLS1_1_VERSION)
+ if (ver == TLS1_1_VERSION)
return (TLSv1_1_server_method());
- else if (ver == TLS1_2_VERSION)
+ if (ver == TLS1_2_VERSION)
return (TLSv1_2_server_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl23_meth_func(SSLv23_server_method,
static const SSL_METHOD *ssl3_get_client_method(int ver);
static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b);
-static const SSL_METHOD
-*ssl3_get_client_method(int ver)
+static const SSL_METHOD *
+ssl3_get_client_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl3_meth_func(SSLv3_client_method,
return (SSL3_NUM_CIPHERS);
}
-const SSL_CIPHER
-*ssl3_get_cipher(unsigned int u)
+const SSL_CIPHER *
+ssl3_get_cipher(unsigned int u)
{
if (u < SSL3_NUM_CIPHERS)
return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]));
/* This function needs to check if the ciphers required are actually
* available */
-const SSL_CIPHER
-*ssl3_get_cipher_by_char(const unsigned char *p)
+const SSL_CIPHER *
+ssl3_get_cipher_by_char(const unsigned char *p)
{
SSL_CIPHER c;
const SSL_CIPHER *cp;
if (s->s3->renegotiate) {
if ((s->s3->rbuf.left == 0) && (s->s3->wbuf.left == 0) &&
!SSL_in_init(s)) {
-/*
-if we are the server, and we have sent a 'RENEGOTIATE' message, we
-need to go to SSL_ST_ACCEPT.
-*/
+ /*
+ * If we are the server, and we have sent
+ * a 'RENEGOTIATE' message, we need to go
+ * to SSL_ST_ACCEPT.
+ */
/* SSL_ST_ACCEPT */
s->state = SSL_ST_RENEGOTIATE;
s->s3->renegotiate = 0;
wr->data = p;
if (eivlen) {
- /* if (RAND_pseudo_bytes(p, eivlen) <= 0)
+ /* if (RAND_pseudo_bytes(p, eivlen) <= 0)
goto err;
-*/
+ */
wr->length += eivlen;
}
static const SSL_METHOD *ssl3_get_server_method(int ver);
-static const SSL_METHOD
-*ssl3_get_server_method(int ver)
+static const SSL_METHOD *
+ssl3_get_server_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_server_method());
- else
- return (NULL);
+ return (NULL);
}
#ifndef OPENSSL_NO_SRP
static const SSL_METHOD *dtls1_get_client_method(int ver);
static int dtls1_get_hello_verify(SSL *s);
-static const SSL_METHOD
-*dtls1_get_client_method(int ver)
+static const SSL_METHOD *
+dtls1_get_client_method(int ver)
{
if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER)
return (DTLSv1_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_client_method,
* to explicitly list their SSL_* codes. Currently RC4 is the only one
* available, but if new ones emerge, they will have to be added...
*/
-const SSL_CIPHER
-*dtls1_get_cipher(unsigned int u)
+const SSL_CIPHER *
+dtls1_get_cipher(unsigned int u)
{
const SSL_CIPHER *ciph = ssl3_get_cipher(u);
#include "ssl_locl.h"
static const SSL_METHOD *dtls1_get_method(int ver);
-static const SSL_METHOD
-*dtls1_get_method(int ver)
+static const SSL_METHOD *
+dtls1_get_method(int ver)
{
if (ver == DTLS1_VERSION)
return (DTLSv1_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_method,
*
*/
/*
- DTLS code by Eric Rescorla <ekr@rtfm.com>
-
- Copyright (C) 2006, Network Resonance, Inc.
- Copyright (C) 2011, RTFM, Inc.
-*/
+ * DTLS code by Eric Rescorla <ekr@rtfm.com>
+ *
+ * Copyright (C) 2006, Network Resonance, Inc.
+ * Copyright (C) 2011, RTFM, Inc.
+ */
#include <stdio.h>
#include <openssl/objects.h>
}
-STACK_OF(SRTP_PROTECTION_PROFILE)
-*SSL_get_srtp_profiles(SSL *s)
+STACK_OF(SRTP_PROTECTION_PROFILE) *
+SSL_get_srtp_profiles(SSL *s)
{
if (s != NULL) {
if (s->srtp_profiles != NULL) {
return NULL;
}
-SRTP_PROTECTION_PROFILE
-*SSL_get_selected_srtp_profile(SSL *s)
+SRTP_PROTECTION_PROFILE *
+SSL_get_selected_srtp_profile(SSL *s)
{
return s->srtp_profile;
}
static const SSL_METHOD *dtls1_get_server_method(int ver);
static int dtls1_send_hello_verify_request(SSL *s);
-static const SSL_METHOD
-*dtls1_get_server_method(int ver)
+static const SSL_METHOD *
+dtls1_get_server_method(int ver)
{
if (ver == DTLS1_VERSION)
return (DTLSv1_server_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_dtls1_meth_func(DTLSv1_server_method,
#define kssl_free(ptr) free((ptr))
-char
-*kstring(char *string)
+char *
+kstring(char *string)
{
static char *null = "[NULL]";
** what the highest assigned CKSUMTYPE_ constant is. As of 1.2.2
** it is 0x000c (CKSUMTYPE_HMAC_SHA1_DES3). So we will use 0x0010.
*/
-static size_t
-*populate_cksumlens(void)
+static size_t *
+populate_cksumlens(void)
{
int i, j, n;
static size_t *cklens = NULL;
** This hackery wouldn't be necessary if MIT KRB5 1.0.6 had the
** krb5_auth_con_getcksumtype() function advertised in its krb5.h.
*/
-unsigned char
-*kssl_skip_confound(krb5_enctype etype, unsigned char *a)
+unsigned char *
+kssl_skip_confound(krb5_enctype etype, unsigned char *a)
{
int i, conlen;
size_t cklen;
** Return pointer to the (partially) filled in struct tm on success,
** return NULL on failure.
*/
-static struct tm
-*k_gmtime(ASN1_GENERALIZEDTIME *gtime, struct tm *k_tm) {
+static struct tm *
+k_gmtime(ASN1_GENERALIZEDTIME *gtime, struct tm *k_tm) {
char c, *p;
if (!k_tm)
static const SSL_METHOD *ssl23_get_client_method(int ver);
static int ssl23_client_hello(SSL *s);
static int ssl23_get_server_hello(SSL *s);
-static const SSL_METHOD
-*ssl23_get_client_method(int ver)
+static const SSL_METHOD *
+ssl23_get_client_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_client_method());
- else if (ver == TLS1_VERSION)
+ if (ver == TLS1_VERSION)
return (TLSv1_client_method());
- else if (ver == TLS1_1_VERSION)
+ if (ver == TLS1_1_VERSION)
return (TLSv1_1_client_method());
- else if (ver == TLS1_2_VERSION)
+ if (ver == TLS1_2_VERSION)
return (TLSv1_2_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl23_meth_func(SSLv23_client_method,
int
ssl23_num_ciphers(void)
{
- return(ssl3_num_ciphers());
+ return (ssl3_num_ciphers());
}
-const SSL_CIPHER
-*ssl23_get_cipher(unsigned int u)
+const SSL_CIPHER *
+ssl23_get_cipher(unsigned int u)
{
unsigned int uu = ssl3_num_ciphers();
/* This function needs to check if the ciphers required are actually
* available */
-const SSL_CIPHER
-*ssl23_get_cipher_by_char(const unsigned char *p)
+const SSL_CIPHER *
+ssl23_get_cipher_by_char(const unsigned char *p)
{
const SSL_CIPHER *cp;
#include "ssl_locl.h"
static const SSL_METHOD *ssl23_get_method(int ver);
-static const SSL_METHOD
-*ssl23_get_method(int ver)
+static const SSL_METHOD *
+ssl23_get_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_method());
- else if (ver == TLS1_VERSION)
+ if (ver == TLS1_VERSION)
return (TLSv1_method());
- else if (ver == TLS1_1_VERSION)
+ if (ver == TLS1_1_VERSION)
return (TLSv1_1_method());
- else if (ver == TLS1_2_VERSION)
+ if (ver == TLS1_2_VERSION)
return (TLSv1_2_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl23_meth_func(SSLv23_method,
{
if (ver == SSL3_VERSION)
return (SSLv3_server_method());
- else if (ver == TLS1_VERSION)
+ if (ver == TLS1_VERSION)
return (TLSv1_server_method());
- else if (ver == TLS1_1_VERSION)
+ if (ver == TLS1_1_VERSION)
return (TLSv1_1_server_method());
- else if (ver == TLS1_2_VERSION)
+ if (ver == TLS1_2_VERSION)
return (TLSv1_2_server_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl23_meth_func(SSLv23_server_method,
static const SSL_METHOD *ssl3_get_client_method(int ver);
static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b);
-static const SSL_METHOD
-*ssl3_get_client_method(int ver)
+static const SSL_METHOD *
+ssl3_get_client_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_client_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl3_meth_func(SSLv3_client_method,
return (SSL3_NUM_CIPHERS);
}
-const SSL_CIPHER
-*ssl3_get_cipher(unsigned int u)
+const SSL_CIPHER *
+ssl3_get_cipher(unsigned int u)
{
if (u < SSL3_NUM_CIPHERS)
return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]));
/* This function needs to check if the ciphers required are actually
* available */
-const SSL_CIPHER
-*ssl3_get_cipher_by_char(const unsigned char *p)
+const SSL_CIPHER *
+ssl3_get_cipher_by_char(const unsigned char *p)
{
SSL_CIPHER c;
const SSL_CIPHER *cp;
if (s->s3->renegotiate) {
if ((s->s3->rbuf.left == 0) && (s->s3->wbuf.left == 0) &&
!SSL_in_init(s)) {
-/*
-if we are the server, and we have sent a 'RENEGOTIATE' message, we
-need to go to SSL_ST_ACCEPT.
-*/
+ /*
+ * If we are the server, and we have sent
+ * a 'RENEGOTIATE' message, we need to go
+ * to SSL_ST_ACCEPT.
+ */
/* SSL_ST_ACCEPT */
s->state = SSL_ST_RENEGOTIATE;
s->s3->renegotiate = 0;
#include "ssl_locl.h"
static const SSL_METHOD *ssl3_get_method(int ver);
-static const SSL_METHOD
-*ssl3_get_method(int ver)
+static const SSL_METHOD *
+ssl3_get_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_method());
- else
- return (NULL);
+ return (NULL);
}
IMPLEMENT_ssl3_meth_func(SSLv3_method,
wr->data = p;
if (eivlen) {
- /* if (RAND_pseudo_bytes(p, eivlen) <= 0)
+ /* if (RAND_pseudo_bytes(p, eivlen) <= 0)
goto err;
-*/
+ */
wr->length += eivlen;
}
static const SSL_METHOD *ssl3_get_server_method(int ver);
-static const SSL_METHOD
-*ssl3_get_server_method(int ver)
+static const SSL_METHOD *
+ssl3_get_server_method(int ver)
{
if (ver == SSL3_VERSION)
return (SSLv3_server_method());
- else
- return (NULL);
+ return (NULL);
}
#ifndef OPENSSL_NO_SRP
*
*/
/*
- DTLS code by Eric Rescorla <ekr@rtfm.com>
-
- Copyright (C) 2006, Network Resonance, Inc.
- Copyright (C) 2011, RTFM, Inc.
-*/
+ * DTLS code by Eric Rescorla <ekr@rtfm.com>
+ *
+ * Copyright (C) 2006, Network Resonance, Inc.
+ * Copyright (C) 2011, RTFM, Inc.
+ */
#ifndef HEADER_D1_SRTP_H
#define HEADER_D1_SRTP_H
unsigned int sid_ctx_len);
SSL_SESSION *SSL_SESSION_new(void);
-const unsigned char
-*SSL_SESSION_get_id(const SSL_SESSION *s,
-unsigned int *len);
+const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
+ unsigned int *len);
unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
#ifndef OPENSSL_NO_FP_API
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
M_ASN1_I2D_finish();
}
-SSL_SESSION
-*d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
-long length)
+SSL_SESSION *
+d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
{
int ssl_version = 0, i;
long id;
#endif
}
-CERT
-*ssl_cert_new(void)
+CERT *
+ssl_cert_new(void)
{
CERT *ret;
return (ret);
}
-CERT
-*ssl_cert_dup(CERT *cert)
+CERT *
+ssl_cert_dup(CERT *cert)
{
CERT *ret;
int i;
}
-SESS_CERT
-*ssl_sess_cert_new(void)
+SESS_CERT *
+ssl_sess_cert_new(void)
{
SESS_CERT *ret;
*ca_list = name_list;
}
-STACK_OF(X509_NAME)
-*SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
+STACK_OF(X509_NAME) *
+SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
{
int i;
STACK_OF(X509_NAME) *ret;
set_client_CA_list(&(ctx->client_CA), name_list);
}
-STACK_OF(X509_NAME)
-*SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
+STACK_OF(X509_NAME) *
+SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
{
return (ctx->client_CA);
}
-STACK_OF(X509_NAME)
-*SSL_get_client_CA_list(const SSL *s)
+STACK_OF(X509_NAME) *
+SSL_get_client_CA_list(const SSL *s)
{
if (s->type == SSL_ST_CONNECT)
{ /* we are in the client */
* \param file the file containing one or more certs.
* \return a ::STACK containing the certs.
*/
-STACK_OF(X509_NAME)
-*SSL_load_client_CA_file(const char *file)
+STACK_OF(X509_NAME) *
+SSL_load_client_CA_file(const char *file)
{
BIO *in;
X509 *x = NULL;
return (retval);
}
-STACK_OF(SSL_CIPHER)
-*ssl_create_cipher_list(const SSL_METHOD *ssl_method,
+STACK_OF(SSL_CIPHER) *
+ssl_create_cipher_list(const SSL_METHOD *ssl_method,
STACK_OF(SSL_CIPHER) **cipher_list,
STACK_OF(SSL_CIPHER) **cipher_list_by_id,
const char *rule_str)
return (cipherstack);
}
-char
-*SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
+char *
+SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
{
int is_export, pkl, kl, l;
const char *ver, *exp_str;
return (buf);
}
-char
-*SSL_CIPHER_get_version(const SSL_CIPHER *c)
+char *
+SSL_CIPHER_get_version(const SSL_CIPHER *c)
{
int i;
}
/* return the actual cipher being used */
-const char
-*SSL_CIPHER_get_name(const SSL_CIPHER *c)
+const char *
+SSL_CIPHER_get_name(const SSL_CIPHER *c)
{
if (c != NULL)
return (c->name);
return c->id;
}
-SSL_COMP
-*ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
+SSL_COMP *
+ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
{
SSL_COMP *ctmp;
int i, nn;
}
#ifdef OPENSSL_NO_COMP
-void
-*SSL_COMP_get_compression_methods(void)
+void *
+SSL_COMP_get_compression_methods(void)
{
return NULL;
}
return 1;
}
-const char
-*SSL_COMP_get_name(const void *comp)
+const char *
+SSL_COMP_get_name(const void *comp)
{
return NULL;
}
#else
-STACK_OF(SSL_COMP)
-*SSL_COMP_get_compression_methods(void)
+STACK_OF(SSL_COMP) *
+SSL_COMP_get_compression_methods(void)
{
load_builtin_compressions();
return (ssl_comp_methods);
}
}
-const char
-*SSL_COMP_get_name(const COMP_METHOD *comp)
+const char *
+SSL_COMP_get_name(const COMP_METHOD *comp)
{
if (comp)
return comp->name;
return (1);
}
-SSL
-*SSL_new(SSL_CTX *ctx)
+SSL *
+SSL_new(SSL_CTX *ctx)
{
SSL *s;
s->wbio = wbio;
}
-BIO
-*SSL_get_rbio(const SSL *s)
- { return (s->rbio);
+BIO *
+SSL_get_rbio(const SSL *s)
+{
+ return (s->rbio);
}
-BIO
-*SSL_get_wbio(const SSL *s)
- { return (s->wbio);
+BIO *
+SSL_get_wbio(const SSL *s)
+{
+ return (s->wbio);
}
int
return (s->method->ssl_pending(s));
}
-X509
-*SSL_get_peer_certificate(const SSL *s)
+X509 *
+SSL_get_peer_certificate(const SSL *s)
{
X509 *r;
return (r);
}
-STACK_OF(X509)
-*SSL_get_peer_cert_chain(const SSL *s)
+STACK_OF(X509) *
+SSL_get_peer_cert_chain(const SSL *s)
{
STACK_OF(X509) *r;
}
}
-LHASH_OF(SSL_SESSION)
-*SSL_CTX_sessions(SSL_CTX *ctx)
+LHASH_OF(SSL_SESSION) *
+SSL_CTX_sessions(SSL_CTX *ctx)
{
return ctx->sessions;
}
/** return a STACK of the ciphers available for the SSL and in order of
* preference */
-STACK_OF(SSL_CIPHER)
-*SSL_get_ciphers(const SSL *s)
+STACK_OF(SSL_CIPHER) *
+SSL_get_ciphers(const SSL *s)
{
if (s != NULL) {
if (s->cipher_list != NULL) {
/** return a STACK of the ciphers available for the SSL and in order of
* algorithm id */
-STACK_OF(SSL_CIPHER)
-*ssl_get_ciphers_by_id(SSL *s)
+STACK_OF(SSL_CIPHER) *
+ssl_get_ciphers_by_id(SSL *s)
{
if (s != NULL) {
if (s->cipher_list_by_id != NULL) {
}
/** The old interface to get the same thing as SSL_get_ciphers() */
-const char
-*SSL_get_cipher_list(const SSL *s, int n)
+const char *
+SSL_get_cipher_list(const SSL *s, int n)
{
SSL_CIPHER *c;
STACK_OF(SSL_CIPHER) *sk;
}
/* works well for SSLv2, not so good for SSLv3 */
-char
-*SSL_get_shared_ciphers(const SSL *s, char *buf, int len)
+char *
+SSL_get_shared_ciphers(const SSL *s, char *buf, int len)
{
char *end;
STACK_OF(SSL_CIPHER) *sk;
return (p - q);
}
-STACK_OF(SSL_CIPHER)
-*ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num,
-STACK_OF(SSL_CIPHER) **skp)
+STACK_OF(SSL_CIPHER) *
+ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num,
+ STACK_OF(SSL_CIPHER) **skp)
{
const SSL_CIPHER *c;
STACK_OF(SSL_CIPHER) *sk;
* So far, only host_name types are defined (RFC 3546).
*/
-const char
-*SSL_get_servername(const SSL *s, const int type)
+const char *
+SSL_get_servername(const SSL *s, const int type)
{
if (type != TLSEXT_NAMETYPE_host_name)
return NULL;
static
IMPLEMENT_LHASH_COMP_FN(ssl_session, SSL_SESSION)
-SSL_CTX
-*SSL_CTX_new(const SSL_METHOD *meth)
+SSL_CTX *
+SSL_CTX_new(const SSL_METHOD *meth)
{
SSL_CTX *ret = NULL;
#endif
/* THIS NEEDS CLEANING UP */
-CERT_PKEY
-*ssl_get_server_send_pkey(const SSL *s)
+CERT_PKEY *
+ssl_get_server_send_pkey(const SSL *s)
{
unsigned long alg_k, alg_a;
CERT *c;
return c->pkeys + i;
}
-X509
-*ssl_get_server_send_cert(const SSL *s)
+X509 *
+ssl_get_server_send_cert(const SSL *s)
{
CERT_PKEY *cpk;
cpk = ssl_get_server_send_pkey(s);
return cpk->x509;
}
-EVP_PKEY
-*ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
+EVP_PKEY *
+ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
{
unsigned long alg_a;
CERT *c;
}
}
-const SSL_METHOD
-*SSL_get_ssl_method(SSL *s)
+const SSL_METHOD *
+SSL_get_ssl_method(SSL *s)
{
return (s->method);
}
}
/* Fix this function so that it takes an optional type parameter */
-X509
-*SSL_get_certificate(const SSL *s)
+X509 *
+SSL_get_certificate(const SSL *s)
{
if (s->cert != NULL)
return (s->cert->key->x509);
}
/* Fix this function so that it takes an optional type parameter */
-EVP_PKEY
-*SSL_get_privatekey(SSL *s)
+EVP_PKEY *
+SSL_get_privatekey(SSL *s)
{
if (s->cert != NULL)
return (s->cert->key->privatekey);
return (NULL);
}
-const SSL_CIPHER
-*SSL_get_current_cipher(const SSL *s)
+const SSL_CIPHER *
+SSL_get_current_cipher(const SSL *s)
{
if ((s->session != NULL) && (s->session->cipher != NULL))
return (s->session->cipher);
return (NULL);
}
#ifdef OPENSSL_NO_COMP
-const void
-*SSL_get_current_compression(SSL *s)
+const void *
+SSL_get_current_compression(SSL *s)
{
return NULL;
}
-const void
-*SSL_get_current_expansion(SSL *s)
+const void *
+SSL_get_current_expansion(SSL *s)
{
return NULL;
}
#else
-const COMP_METHOD
-*SSL_get_current_compression(SSL *s)
+const COMP_METHOD *
+SSL_get_current_compression(SSL *s)
{
if (s->compress != NULL)
return (s->compress->meth);
return (NULL);
}
-const COMP_METHOD
-*SSL_get_current_expansion(SSL *s)
+const COMP_METHOD *
+SSL_get_current_expansion(SSL *s)
{
if (s->expand != NULL)
return (s->expand->meth);
return (s->version);
}
-SSL_CTX
-*SSL_get_SSL_CTX(const SSL *ssl)
+SSL_CTX *
+SSL_get_SSL_CTX(const SSL *ssl)
{
return (ssl->ctx);
}
-SSL_CTX
-*SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
+SSL_CTX *
+SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
{
if (ssl->ctx == ctx)
return ssl->ctx;
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_get_ex_data(const SSL *s, int idx)
+void *
+SSL_get_ex_data(const SSL *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
+void *
+SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
return (1);
}
-X509_STORE
-*SSL_CTX_get_cert_store(const SSL_CTX *ctx)
+X509_STORE *
+SSL_CTX_get_cert_store(const SSL_CTX *ctx)
{
return (ctx->cert_store);
}
* \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback
*/
-RSA
-*cb(SSL *ssl, int is_export, int keylength)
+RSA *
+cb(SSL *ssl, int is_export, int keylength)
{}
#endif
return 1;
}
-const char
-*SSL_get_psk_identity_hint(const SSL *s)
+const char *
+SSL_get_psk_identity_hint(const SSL *s)
{
if (s == NULL || s->session == NULL)
return NULL;
return (s->session->psk_identity_hint);
}
-const char
-*SSL_get_psk_identity(const SSL *s)
+const char *
+SSL_get_psk_identity(const SSL *s)
{
if (s == NULL || s->session == NULL)
return NULL;
* Returns newly allocated ctx;
*/
-EVP_MD_CTX
-*ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
+EVP_MD_CTX *
+ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
{
ssl_clear_hash_ctx(hash);
*hash = EVP_MD_CTX_create();
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
-SSL_SESSION
-*SSL_get_session(const SSL *ssl)
/* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */
+SSL_SESSION *
+SSL_get_session(const SSL *ssl)
{
return (ssl->session);
}
-SSL_SESSION
-*SSL_get1_session(SSL *ssl)
/* variant of SSL_get_session: caller really gets something */
+SSL_SESSION *
+SSL_get1_session(SSL *ssl)
{
SSL_SESSION *sess;
/* Need to lock this all up rather than just use CRYPTO_add so that
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx)
+void *
+SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
-SSL_SESSION
-*SSL_SESSION_new(void)
+SSL_SESSION *
+SSL_SESSION_new(void)
{
SSL_SESSION *ss;
return (ss);
}
-const unsigned char
-*SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
+const unsigned char *
+SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
{
if (len)
*len = s->session_id_length;
return (t);
}
-X509
-*SSL_SESSION_get0_peer(SSL_SESSION *s)
+X509 *
+SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;
}
#include <stdio.h>
#include "ssl_locl.h"
-const char
-*SSL_state_string_long(const SSL *s)
+const char *
+SSL_state_string_long(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_rstate_string_long(const SSL *s)
+const char *
+SSL_rstate_string_long(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_state_string(const SSL *s)
+const char *
+SSL_state_string(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_alert_type_string_long(int value)
+const char *
+SSL_alert_type_string_long(int value)
{
value>>=8;
if (value == SSL3_AL_WARNING)
return("unknown");
}
-const char
-*SSL_alert_type_string(int value)
+const char *
+SSL_alert_type_string(int value)
{
value>>=8;
if (value == SSL3_AL_WARNING)
return("U");
}
-const char
-*SSL_alert_desc_string(int value)
+const char *
+SSL_alert_desc_string(int value)
{
const char *str;
return (str);
}
-const char
-*SSL_alert_desc_string_long(int value)
+const char *
+SSL_alert_desc_string_long(int value)
{
const char *str;
return (str);
}
-const char
-*SSL_rstate_string(const SSL *s)
+const char *
+SSL_rstate_string(const SSL *s)
{
const char *str;
static RSA *rsa_tmp = NULL;
-static RSA
-*tmp_rsa_cb(SSL *s, int is_export, int keylength)
+static RSA *
+tmp_rsa_cb(SSL *s, int is_export, int keylength)
{
BIGNUM *bn = NULL;
if (rsa_tmp == NULL) {
* $ openssl dhparam -C -noout -dsaparam 1024
* (The third function has been renamed to avoid name conflicts.)
*/
-static DH
-*get_dh512()
+static DH *
+get_dh512()
{
static unsigned char dh512_p[] = {
0xCB, 0xC8, 0xE1, 0x86, 0xD0, 0x1F, 0x94, 0x17, 0xA6, 0x99, 0xF0, 0xC6,
return (dh);
}
-static DH
-*get_dh1024()
+static DH *
+get_dh1024()
{
static unsigned char dh1024_p[] = {
0xF8, 0x81, 0x89, 0x7D, 0x14, 0x24, 0xC5, 0xD1, 0xE6, 0xF7, 0xBF, 0x3A,
return (dh);
}
-static DH
-*get_dh1024dsa()
+static DH *
+get_dh1024dsa()
{
static unsigned char dh1024_p[] = {
0xC8, 0x00, 0xF7, 0x08, 0x07, 0x89, 0x4D, 0x90, 0x53, 0xF3, 0xD5, 0x00,
static const SSL_METHOD *tls1_get_client_method(int ver);
-static const SSL_METHOD
-*tls1_get_client_method(int ver)
+static const SSL_METHOD *
+tls1_get_client_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_client_method();
+ return (TLSv1_2_client_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_client_method();
+ return (TLSv1_1_client_method());
if (ver == TLS1_VERSION)
- return TLSv1_client_method();
- return NULL;
+ return (TLSv1_client_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method,
return (int)slen;
}
-unsigned char
-*ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
+unsigned char *
+ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
{
int extdatalen = 0;
unsigned char *ret = p;
return ret;
}
-unsigned char
-*ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
+unsigned char *
+ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
{
int extdatalen = 0;
unsigned char *ret = p;
sizeof(tls12_sig)/sizeof(tls12_lookup));
}
-const EVP_MD
-*tls12_get_hash(unsigned char hash_alg)
+const EVP_MD *
+tls12_get_hash(unsigned char hash_alg)
{
switch (hash_alg) {
case TLSEXT_hash_sha1:
#include <openssl/objects.h>
#include "ssl_locl.h"
-static const SSL_METHOD
-*tls1_get_method(int ver)
+static const SSL_METHOD *
+tls1_get_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_method();
+ return (TLSv1_2_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_method();
+ return (TLSv1_1_method());
if (ver == TLS1_VERSION)
- return TLSv1_method();
- return NULL;
+ return (TLSv1_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method,
static const SSL_METHOD *tls1_get_server_method(int ver);
-static const SSL_METHOD
-*tls1_get_server_method(int ver)
+static const SSL_METHOD *
+tls1_get_server_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_server_method();
+ return (TLSv1_2_server_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_server_method();
+ return (TLSv1_1_server_method());
if (ver == TLS1_VERSION)
- return TLSv1_server_method();
- return NULL;
+ return (TLSv1_server_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method,
return 1;
}
-BIGNUM
-*SSL_get_srp_g(SSL *s)
+BIGNUM *
+SSL_get_srp_g(SSL *s)
{
if (s->srp_ctx.g != NULL)
return s->srp_ctx.g;
return s->ctx->srp_ctx.g;
}
-BIGNUM
-*SSL_get_srp_N(SSL *s)
+BIGNUM *
+SSL_get_srp_N(SSL *s)
{
if (s->srp_ctx.N != NULL)
return s->srp_ctx.N;
return s->ctx->srp_ctx.N;
}
-char
-*SSL_get_srp_username(SSL *s)
+char *
+SSL_get_srp_username(SSL *s)
{
if (s->srp_ctx.login != NULL)
return s->srp_ctx.login;
return s->ctx->srp_ctx.login;
}
-char
-*SSL_get_srp_userinfo(SSL *s)
+char *
+SSL_get_srp_userinfo(SSL *s)
{
if (s->srp_ctx.info != NULL)
return s->srp_ctx.info;
*
*/
/*
- DTLS code by Eric Rescorla <ekr@rtfm.com>
-
- Copyright (C) 2006, Network Resonance, Inc.
- Copyright (C) 2011, RTFM, Inc.
-*/
+ * DTLS code by Eric Rescorla <ekr@rtfm.com>
+ *
+ * Copyright (C) 2006, Network Resonance, Inc.
+ * Copyright (C) 2011, RTFM, Inc.
+ */
#ifndef HEADER_D1_SRTP_H
#define HEADER_D1_SRTP_H
unsigned int sid_ctx_len);
SSL_SESSION *SSL_SESSION_new(void);
-const unsigned char
-*SSL_SESSION_get_id(const SSL_SESSION *s,
-unsigned int *len);
+const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,
+ unsigned int *len);
unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);
#ifndef OPENSSL_NO_FP_API
int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);
M_ASN1_I2D_finish();
}
-SSL_SESSION
-*d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
-long length)
+SSL_SESSION *
+d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
{
int ssl_version = 0, i;
long id;
#endif
}
-CERT
-*ssl_cert_new(void)
+CERT *
+ssl_cert_new(void)
{
CERT *ret;
return (ret);
}
-CERT
-*ssl_cert_dup(CERT *cert)
+CERT *
+ssl_cert_dup(CERT *cert)
{
CERT *ret;
int i;
}
-SESS_CERT
-*ssl_sess_cert_new(void)
+SESS_CERT *
+ssl_sess_cert_new(void)
{
SESS_CERT *ret;
*ca_list = name_list;
}
-STACK_OF(X509_NAME)
-*SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
+STACK_OF(X509_NAME) *
+SSL_dup_CA_list(STACK_OF(X509_NAME) *sk)
{
int i;
STACK_OF(X509_NAME) *ret;
set_client_CA_list(&(ctx->client_CA), name_list);
}
-STACK_OF(X509_NAME)
-*SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
+STACK_OF(X509_NAME) *
+SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
{
return (ctx->client_CA);
}
-STACK_OF(X509_NAME)
-*SSL_get_client_CA_list(const SSL *s)
+STACK_OF(X509_NAME) *
+SSL_get_client_CA_list(const SSL *s)
{
if (s->type == SSL_ST_CONNECT)
{ /* we are in the client */
* \param file the file containing one or more certs.
* \return a ::STACK containing the certs.
*/
-STACK_OF(X509_NAME)
-*SSL_load_client_CA_file(const char *file)
+STACK_OF(X509_NAME) *
+SSL_load_client_CA_file(const char *file)
{
BIO *in;
X509 *x = NULL;
return (retval);
}
-STACK_OF(SSL_CIPHER)
-*ssl_create_cipher_list(const SSL_METHOD *ssl_method,
+STACK_OF(SSL_CIPHER) *
+ssl_create_cipher_list(const SSL_METHOD *ssl_method,
STACK_OF(SSL_CIPHER) **cipher_list,
STACK_OF(SSL_CIPHER) **cipher_list_by_id,
const char *rule_str)
return (cipherstack);
}
-char
-*SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
+char *
+SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
{
int is_export, pkl, kl, l;
const char *ver, *exp_str;
return (buf);
}
-char
-*SSL_CIPHER_get_version(const SSL_CIPHER *c)
+char *
+SSL_CIPHER_get_version(const SSL_CIPHER *c)
{
int i;
}
/* return the actual cipher being used */
-const char
-*SSL_CIPHER_get_name(const SSL_CIPHER *c)
+const char *
+SSL_CIPHER_get_name(const SSL_CIPHER *c)
{
if (c != NULL)
return (c->name);
return c->id;
}
-SSL_COMP
-*ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
+SSL_COMP *
+ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
{
SSL_COMP *ctmp;
int i, nn;
}
#ifdef OPENSSL_NO_COMP
-void
-*SSL_COMP_get_compression_methods(void)
+void *
+SSL_COMP_get_compression_methods(void)
{
return NULL;
}
return 1;
}
-const char
-*SSL_COMP_get_name(const void *comp)
+const char *
+SSL_COMP_get_name(const void *comp)
{
return NULL;
}
#else
-STACK_OF(SSL_COMP)
-*SSL_COMP_get_compression_methods(void)
+STACK_OF(SSL_COMP) *
+SSL_COMP_get_compression_methods(void)
{
load_builtin_compressions();
return (ssl_comp_methods);
}
}
-const char
-*SSL_COMP_get_name(const COMP_METHOD *comp)
+const char *
+SSL_COMP_get_name(const COMP_METHOD *comp)
{
if (comp)
return comp->name;
return (1);
}
-SSL
-*SSL_new(SSL_CTX *ctx)
+SSL *
+SSL_new(SSL_CTX *ctx)
{
SSL *s;
s->wbio = wbio;
}
-BIO
-*SSL_get_rbio(const SSL *s)
- { return (s->rbio);
+BIO *
+SSL_get_rbio(const SSL *s)
+{
+ return (s->rbio);
}
-BIO
-*SSL_get_wbio(const SSL *s)
- { return (s->wbio);
+BIO *
+SSL_get_wbio(const SSL *s)
+{
+ return (s->wbio);
}
int
return (s->method->ssl_pending(s));
}
-X509
-*SSL_get_peer_certificate(const SSL *s)
+X509 *
+SSL_get_peer_certificate(const SSL *s)
{
X509 *r;
return (r);
}
-STACK_OF(X509)
-*SSL_get_peer_cert_chain(const SSL *s)
+STACK_OF(X509) *
+SSL_get_peer_cert_chain(const SSL *s)
{
STACK_OF(X509) *r;
}
}
-LHASH_OF(SSL_SESSION)
-*SSL_CTX_sessions(SSL_CTX *ctx)
+LHASH_OF(SSL_SESSION) *
+SSL_CTX_sessions(SSL_CTX *ctx)
{
return ctx->sessions;
}
/** return a STACK of the ciphers available for the SSL and in order of
* preference */
-STACK_OF(SSL_CIPHER)
-*SSL_get_ciphers(const SSL *s)
+STACK_OF(SSL_CIPHER) *
+SSL_get_ciphers(const SSL *s)
{
if (s != NULL) {
if (s->cipher_list != NULL) {
/** return a STACK of the ciphers available for the SSL and in order of
* algorithm id */
-STACK_OF(SSL_CIPHER)
-*ssl_get_ciphers_by_id(SSL *s)
+STACK_OF(SSL_CIPHER) *
+ssl_get_ciphers_by_id(SSL *s)
{
if (s != NULL) {
if (s->cipher_list_by_id != NULL) {
}
/** The old interface to get the same thing as SSL_get_ciphers() */
-const char
-*SSL_get_cipher_list(const SSL *s, int n)
+const char *
+SSL_get_cipher_list(const SSL *s, int n)
{
SSL_CIPHER *c;
STACK_OF(SSL_CIPHER) *sk;
}
/* works well for SSLv2, not so good for SSLv3 */
-char
-*SSL_get_shared_ciphers(const SSL *s, char *buf, int len)
+char *
+SSL_get_shared_ciphers(const SSL *s, char *buf, int len)
{
char *end;
STACK_OF(SSL_CIPHER) *sk;
return (p - q);
}
-STACK_OF(SSL_CIPHER)
-*ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num,
-STACK_OF(SSL_CIPHER) **skp)
+STACK_OF(SSL_CIPHER) *
+ssl_bytes_to_cipher_list(SSL *s, unsigned char *p, int num,
+ STACK_OF(SSL_CIPHER) **skp)
{
const SSL_CIPHER *c;
STACK_OF(SSL_CIPHER) *sk;
* So far, only host_name types are defined (RFC 3546).
*/
-const char
-*SSL_get_servername(const SSL *s, const int type)
+const char *
+SSL_get_servername(const SSL *s, const int type)
{
if (type != TLSEXT_NAMETYPE_host_name)
return NULL;
static
IMPLEMENT_LHASH_COMP_FN(ssl_session, SSL_SESSION)
-SSL_CTX
-*SSL_CTX_new(const SSL_METHOD *meth)
+SSL_CTX *
+SSL_CTX_new(const SSL_METHOD *meth)
{
SSL_CTX *ret = NULL;
#endif
/* THIS NEEDS CLEANING UP */
-CERT_PKEY
-*ssl_get_server_send_pkey(const SSL *s)
+CERT_PKEY *
+ssl_get_server_send_pkey(const SSL *s)
{
unsigned long alg_k, alg_a;
CERT *c;
return c->pkeys + i;
}
-X509
-*ssl_get_server_send_cert(const SSL *s)
+X509 *
+ssl_get_server_send_cert(const SSL *s)
{
CERT_PKEY *cpk;
cpk = ssl_get_server_send_pkey(s);
return cpk->x509;
}
-EVP_PKEY
-*ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
+EVP_PKEY *
+ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
{
unsigned long alg_a;
CERT *c;
}
}
-const SSL_METHOD
-*SSL_get_ssl_method(SSL *s)
+const SSL_METHOD *
+SSL_get_ssl_method(SSL *s)
{
return (s->method);
}
}
/* Fix this function so that it takes an optional type parameter */
-X509
-*SSL_get_certificate(const SSL *s)
+X509 *
+SSL_get_certificate(const SSL *s)
{
if (s->cert != NULL)
return (s->cert->key->x509);
}
/* Fix this function so that it takes an optional type parameter */
-EVP_PKEY
-*SSL_get_privatekey(SSL *s)
+EVP_PKEY *
+SSL_get_privatekey(SSL *s)
{
if (s->cert != NULL)
return (s->cert->key->privatekey);
return (NULL);
}
-const SSL_CIPHER
-*SSL_get_current_cipher(const SSL *s)
+const SSL_CIPHER *
+SSL_get_current_cipher(const SSL *s)
{
if ((s->session != NULL) && (s->session->cipher != NULL))
return (s->session->cipher);
return (NULL);
}
#ifdef OPENSSL_NO_COMP
-const void
-*SSL_get_current_compression(SSL *s)
+const void *
+SSL_get_current_compression(SSL *s)
{
return NULL;
}
-const void
-*SSL_get_current_expansion(SSL *s)
+const void *
+SSL_get_current_expansion(SSL *s)
{
return NULL;
}
#else
-const COMP_METHOD
-*SSL_get_current_compression(SSL *s)
+const COMP_METHOD *
+SSL_get_current_compression(SSL *s)
{
if (s->compress != NULL)
return (s->compress->meth);
return (NULL);
}
-const COMP_METHOD
-*SSL_get_current_expansion(SSL *s)
+const COMP_METHOD *
+SSL_get_current_expansion(SSL *s)
{
if (s->expand != NULL)
return (s->expand->meth);
return (s->version);
}
-SSL_CTX
-*SSL_get_SSL_CTX(const SSL *ssl)
+SSL_CTX *
+SSL_get_SSL_CTX(const SSL *ssl)
{
return (ssl->ctx);
}
-SSL_CTX
-*SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
+SSL_CTX *
+SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
{
if (ssl->ctx == ctx)
return ssl->ctx;
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_get_ex_data(const SSL *s, int idx)
+void *
+SSL_get_ex_data(const SSL *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
+void *
+SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
return (1);
}
-X509_STORE
-*SSL_CTX_get_cert_store(const SSL_CTX *ctx)
+X509_STORE *
+SSL_CTX_get_cert_store(const SSL_CTX *ctx)
{
return (ctx->cert_store);
}
* \sa SSL_CTX_set_tmp_rsa_callback, SSL_set_tmp_rsa_callback
*/
-RSA
-*cb(SSL *ssl, int is_export, int keylength)
+RSA *
+cb(SSL *ssl, int is_export, int keylength)
{}
#endif
return 1;
}
-const char
-*SSL_get_psk_identity_hint(const SSL *s)
+const char *
+SSL_get_psk_identity_hint(const SSL *s)
{
if (s == NULL || s->session == NULL)
return NULL;
return (s->session->psk_identity_hint);
}
-const char
-*SSL_get_psk_identity(const SSL *s)
+const char *
+SSL_get_psk_identity(const SSL *s)
{
if (s == NULL || s->session == NULL)
return NULL;
* Returns newly allocated ctx;
*/
-EVP_MD_CTX
-*ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
+EVP_MD_CTX *
+ssl_replace_hash(EVP_MD_CTX **hash, const EVP_MD *md)
{
ssl_clear_hash_ctx(hash);
*hash = EVP_MD_CTX_create();
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
-SSL_SESSION
-*SSL_get_session(const SSL *ssl)
/* aka SSL_get0_session; gets 0 objects, just returns a copy of the pointer */
+SSL_SESSION *
+SSL_get_session(const SSL *ssl)
{
return (ssl->session);
}
-SSL_SESSION
-*SSL_get1_session(SSL *ssl)
/* variant of SSL_get_session: caller really gets something */
+SSL_SESSION *
+SSL_get1_session(SSL *ssl)
{
SSL_SESSION *sess;
/* Need to lock this all up rather than just use CRYPTO_add so that
return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
-void
-*SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx)
+void *
+SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx)
{
return (CRYPTO_get_ex_data(&s->ex_data, idx));
}
-SSL_SESSION
-*SSL_SESSION_new(void)
+SSL_SESSION *
+SSL_SESSION_new(void)
{
SSL_SESSION *ss;
return (ss);
}
-const unsigned char
-*SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
+const unsigned char *
+SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
{
if (len)
*len = s->session_id_length;
return (t);
}
-X509
-*SSL_SESSION_get0_peer(SSL_SESSION *s)
+X509 *
+SSL_SESSION_get0_peer(SSL_SESSION *s)
{
return s->peer;
}
#include <stdio.h>
#include "ssl_locl.h"
-const char
-*SSL_state_string_long(const SSL *s)
+const char *
+SSL_state_string_long(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_rstate_string_long(const SSL *s)
+const char *
+SSL_rstate_string_long(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_state_string(const SSL *s)
+const char *
+SSL_state_string(const SSL *s)
{
const char *str;
return (str);
}
-const char
-*SSL_alert_type_string_long(int value)
+const char *
+SSL_alert_type_string_long(int value)
{
value>>=8;
if (value == SSL3_AL_WARNING)
return("unknown");
}
-const char
-*SSL_alert_type_string(int value)
+const char *
+SSL_alert_type_string(int value)
{
value>>=8;
if (value == SSL3_AL_WARNING)
return("U");
}
-const char
-*SSL_alert_desc_string(int value)
+const char *
+SSL_alert_desc_string(int value)
{
const char *str;
return (str);
}
-const char
-*SSL_alert_desc_string_long(int value)
+const char *
+SSL_alert_desc_string_long(int value)
{
const char *str;
return (str);
}
-const char
-*SSL_rstate_string(const SSL *s)
+const char *
+SSL_rstate_string(const SSL *s)
{
const char *str;
static const SSL_METHOD *tls1_get_client_method(int ver);
-static const SSL_METHOD
-*tls1_get_client_method(int ver)
+static const SSL_METHOD *
+tls1_get_client_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_client_method();
+ return (TLSv1_2_client_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_client_method();
+ return (TLSv1_1_client_method());
if (ver == TLS1_VERSION)
- return TLSv1_client_method();
- return NULL;
+ return (TLSv1_client_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method,
return (int)slen;
}
-unsigned char
-*ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
+unsigned char *
+ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
{
int extdatalen = 0;
unsigned char *ret = p;
return ret;
}
-unsigned char
-*ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
+unsigned char *
+ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
{
int extdatalen = 0;
unsigned char *ret = p;
sizeof(tls12_sig)/sizeof(tls12_lookup));
}
-const EVP_MD
-*tls12_get_hash(unsigned char hash_alg)
+const EVP_MD *
+tls12_get_hash(unsigned char hash_alg)
{
switch (hash_alg) {
case TLSEXT_hash_sha1:
#include <openssl/objects.h>
#include "ssl_locl.h"
-static const SSL_METHOD
-*tls1_get_method(int ver)
+static const SSL_METHOD *
+tls1_get_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_method();
+ return (TLSv1_2_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_method();
+ return (TLSv1_1_method());
if (ver == TLS1_VERSION)
- return TLSv1_method();
- return NULL;
+ return (TLSv1_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method,
static const SSL_METHOD *tls1_get_server_method(int ver);
-static const SSL_METHOD
-*tls1_get_server_method(int ver)
+static const SSL_METHOD *
+tls1_get_server_method(int ver)
{
if (ver == TLS1_2_VERSION)
- return TLSv1_2_server_method();
+ return (TLSv1_2_server_method());
if (ver == TLS1_1_VERSION)
- return TLSv1_1_server_method();
+ return (TLSv1_1_server_method());
if (ver == TLS1_VERSION)
- return TLSv1_server_method();
- return NULL;
+ return (TLSv1_server_method());
+ return (NULL);
}
IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_server_method,