unified them.
- return (0); -> return 0;
- return (1); -> return 1;
- return (-1); -> return -1;
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4500)
}
}
arg->argv[arg->argc] = NULL;
- return (1);
+ return 1;
}
#ifndef APP_INIT
int app_init(long mesgwin)
{
- return (1);
+ return 1;
}
#endif
BIO_printf(bio_err, "Invalid command '%s'; type \"help\" for a list.\n",
argv[0]);
- return (1);
+ return 1;
}
static void list_pkey(void)
int rehash_main(int argc, char **argv)
{
BIO_printf(bio_err, "Not available; use c_rehash script\n");
- return (1);
+ return 1;
}
#endif /* defined(OPENSSL_SYS_UNIX) || defined(__APPLE__) */
return (0);
}
}
- return (1);
+ return 1;
}
int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key,
if ((dtlslisten && i == 0)
|| (!dtlslisten && retry)) {
BIO_printf(bio_s_out, "DELAY\n");
- return (1);
+ return 1;
}
BIO_printf(bio_err, "ERROR\n");
unsigned char *p, *d;
if (a == NULL)
- return (0);
+ return 0;
len = a->length;
a->data[w] = ((a->data[w]) & iv) | v;
while ((a->length > 0) && (a->data[a->length - 1] == 0))
a->length--;
- return (1);
+ return 1;
}
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n)
w = n / 8;
v = 1 << (7 - (n & 0x07));
if ((a == NULL) || (a->length < (w + 1)) || (a->data == NULL))
- return (0);
+ return 0;
return ((a->data[w] & v) != 0);
}
return 0;
}
OPENSSL_free(str);
- return (1);
+ return 1;
}
#endif
return 0;
}
OPENSSL_free(str);
- return (1);
+ return 1;
}
*(p) = '\0';
s->length /= 4;
s->type = ASN1_PRINTABLE_type(s->data, s->length);
- return (1);
+ return 1;
}
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v)
if (n > 0)
if (BIO_write(bp, buf, n) <= 0)
return (0);
- return (1);
+ return 1;
}
return 0;
}
ASN1_TYPE_set(a, V_ASN1_OCTET_STRING, os);
- return (1);
+ return 1;
}
/* int max_len: for returned value */
return (-1);
# endif
- return (1);
+ return 1;
}
void bio_sock_cleanup_int(void)
bi->init = 1;
bi->ptr = (char *)ctx;
bi->flags = 0;
- return (1);
+ return 1;
}
static int buffer_free(BIO *a)
a->ptr = NULL;
a->init = 0;
a->flags = 0;
- return (1);
+ return 1;
}
static int buffer_read(BIO *b, char *out, int outl)
bi->init = 1;
bi->ptr = (char *)ctx;
bi->flags = 0;
- return (1);
+ return 1;
}
static int linebuffer_free(BIO *a)
a->ptr = NULL;
a->init = 0;
a->flags = 0;
- return (1);
+ return 1;
}
static int linebuffer_read(BIO *b, char *out, int outl)
nt->lwn = -1;
bi->ptr = (char *)nt;
bi->init = 1;
- return (1);
+ return 1;
}
static int nbiof_free(BIO *a)
a->ptr = NULL;
a->init = 0;
a->flags = 0;
- return (1);
+ return 1;
}
static int nbiof_read(BIO *b, char *out, int outl)
bi->init = 1;
bi->ptr = NULL;
bi->flags = 0;
- return (1);
+ return 1;
}
static int nullf_free(BIO *a)
a->init=0;
a->flags=0;
*/
- return (1);
+ return 1;
}
static int nullf_read(BIO *b, char *out, int outl)
bi->ptr = (char *)ba;
ba->state = ACPT_S_BEFORE;
bi->shutdown = 1;
- return (1);
+ return 1;
}
static BIO_ACCEPT *BIO_ACCEPT_new(void)
a->flags = 0;
a->init = 0;
}
- return (1);
+ return 1;
}
static int acpt_state(BIO *b, BIO_ACCEPT *c)
if ((bi->ptr = (char *)BIO_CONNECT_new()) == NULL)
return (0);
else
- return (1);
+ return 1;
}
static void conn_close_socket(BIO *bio)
a->flags = 0;
a->init = 0;
}
- return (1);
+ return 1;
}
static int conn_read(BIO *b, char *out, int outl)
if (data == NULL)
return 0;
bi->ptr = data;
- return (1);
+ return 1;
}
static int dgram_free(BIO *a)
data = (bio_dgram_data *)a->ptr;
OPENSSL_free(data);
- return (1);
+ return 1;
}
static int dgram_clear(BIO *a)
a->init = 0;
a->flags = 0;
}
- return (1);
+ return 1;
}
static void dgram_adjust_rcv_timeout(BIO *b)
bi->ptr = data;
bi->flags = 0;
- return (1);
+ return 1;
}
static int dgram_sctp_free(BIO *a)
if (data != NULL)
OPENSSL_free(data);
- return (1);
+ return 1;
}
# ifdef SCTP_AUTHENTICATION_EVENT
case EALREADY:
# endif
- return (1);
+ return 1;
default:
break;
}
bi->num = -1;
bi->ptr = NULL;
bi->flags = BIO_FLAGS_UPLINK; /* essentially redundant */
- return (1);
+ return 1;
}
static int fd_free(BIO *a)
a->init = 0;
a->flags = BIO_FLAGS_UPLINK;
}
- return (1);
+ return 1;
}
static int fd_read(BIO *b, char *out, int outl)
# ifdef EALREADY
case EALREADY:
# endif
- return (1);
+ return 1;
default:
break;
}
bi->num = 0;
bi->ptr = NULL;
xopenlog(bi, "application", LOG_DAEMON);
- return (1);
+ return 1;
}
static int slg_free(BIO *a)
if (a == NULL)
return (0);
xcloselog(a);
- return (1);
+ return 1;
}
static int slg_write(BIO *b, const char *in, int inl)
a->ptr = NULL;
}
}
- return (1);
+ return 1;
}
/*
bi->init = 1;
bi->num = 0;
bi->ptr = (NULL);
- return (1);
+ return 1;
}
static int null_free(BIO *a)
{
if (a == NULL)
return (0);
- return (1);
+ return 1;
}
static int null_read(BIO *b, char *out, int outl)
bi->num = 0;
bi->ptr = NULL;
bi->flags = 0;
- return (1);
+ return 1;
}
static int sock_free(BIO *a)
a->init = 0;
a->flags = 0;
}
- return (1);
+ return 1;
}
static int sock_read(BIO *b, char *out, int outl)
# ifdef EALREADY
case EALREADY:
# endif
- return (1);
+ return 1;
default:
break;
}
}
if (dv != NULL)
BN_zero(dv);
- return (1);
+ return 1;
}
BN_CTX_start(ctx);
}
if (dv != NULL)
BN_zero(dv);
- return (1);
+ return 1;
}
BN_CTX_start(ctx);
if (no_branch)
bn_correct_top(res);
BN_CTX_end(ctx);
- return (1);
+ return 1;
err:
bn_check_top(rm);
BN_CTX_end(ctx);
a->d[0] = w;
a->top = (w ? 1 : 0);
bn_check_top(a);
- return (1);
+ return 1;
}
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
if (a != NULL)
return (-1);
else if (b != NULL)
- return (1);
+ return 1;
else
return (0);
}
if (a->neg)
return (-1);
else
- return (1);
+ return 1;
}
if (a->neg == 0) {
gt = 1;
a->d[i] |= (((BN_ULONG)1) << j);
bn_check_top(a);
- return (1);
+ return 1;
}
int BN_clear_bit(BIGNUM *a, int n)
a->d[i] &= (~(((BN_ULONG)1) << j));
bn_correct_top(a);
- return (1);
+ return 1;
}
int BN_is_bit_set(const BIGNUM *a, int n)
a->d[w] &= ~(BN_MASK2 << b);
}
bn_correct_top(a);
- return (1);
+ return 1;
}
void BN_set_negative(BIGNUM *a, int b)
r->neg = a->neg ^ b->neg;
r->top = num;
bn_correct_top(r);
- return (1);
+ return 1;
}
}
#endif
nl = n->top;
if (nl == 0) {
ret->top = 0;
- return (1);
+ return 1;
}
max = (2 * nl); /* carry is stored separately */
bn_correct_top(ret);
bn_check_top(ret);
- return (1);
+ return 1;
}
#endif /* MONT_WORD */
if ((al == 0) || (bl == 0)) {
BN_zero(r);
- return (1);
+ return 1;
}
top = al + bl;
if (BN_num_bits(rnd) != bits)
goto again;
bn_check_top(rnd);
- return (1);
+ return 1;
}
int bn_probable_prime_dh(BIGNUM *rnd, int bits,
BN_zero(&(recp->Nr));
recp->num_bits = BN_num_bits(d);
recp->shift = 0;
- return (1);
+ return 1;
}
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
return 0;
}
BN_CTX_end(ctx);
- return (1);
+ return 1;
}
/*
r->top++;
}
bn_check_top(r);
- return (1);
+ return 1;
}
int BN_rshift1(BIGNUM *r, const BIGNUM *a)
if (BN_is_zero(a)) {
BN_zero(r);
- return (1);
+ return 1;
}
i = a->top;
ap = a->d;
if (!r->top)
r->neg = 0; /* don't allow negative zero */
bn_check_top(r);
- return (1);
+ return 1;
}
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
r->top = a->top + nw + 1;
bn_correct_top(r);
bn_check_top(r);
- return (1);
+ return 1;
}
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
lb = BN_BITS2 - rb;
if (nw >= a->top || a->top == 0) {
BN_zero(r);
- return (1);
+ return 1;
}
i = (BN_num_bits(a) - n + (BN_BITS2 - 1)) / BN_BITS2;
if (r != a) {
if (!r->top)
r->neg = 0; /* don't allow negative zero */
bn_check_top(r);
- return (1);
+ return 1;
}
a->d[i] = w;
}
bn_check_top(a);
- return (1);
+ return 1;
}
int BN_sub_word(BIGNUM *a, BN_ULONG w)
if ((a->top == 1) && (a->d[0] < w)) {
a->d[0] = w - a->d[0];
a->neg = 1;
- return (1);
+ return 1;
}
i = 0;
for (;;) {
if ((a->d[i] == 0) && (i == (a->top - 1)))
a->top--;
bn_check_top(a);
- return (1);
+ return 1;
}
int BN_mul_word(BIGNUM *a, BN_ULONG w)
}
}
bn_check_top(a);
- return (1);
+ return 1;
}
return (0);
} while (DES_is_weak_key(ret));
DES_set_odd_parity(ret);
- return (1);
+ return 1;
}
if ((*key)[i] != odd_parity[(*key)[i]])
return (0);
}
- return (1);
+ return 1;
}
/*-
* 97/03/18
*/
if (memcmp(weak_keys[i], key, sizeof(DES_cblock)) == 0)
- return (1);
+ return 1;
return (0);
}
static int dh_init(DH *dh)
{
dh->flags |= DH_FLAG_CACHE_MONT_P;
- return (1);
+ return 1;
}
static int dh_finish(DH *dh)
{
BN_MONT_CTX_free(dh->method_mont_p);
- return (1);
+ return 1;
}
}
*siglen = i2d_DSA_SIG(s, &sig);
DSA_SIG_free(s);
- return (1);
+ return 1;
}
/* data has already been hashed (probably with SHA or SHA-1). */
static int dsa_init(DSA *dsa)
{
dsa->flags |= DSA_FLAG_CACHE_MONT_P;
- return (1);
+ return 1;
}
static int dsa_finish(DSA *dsa)
{
BN_MONT_CTX_free(dsa->method_mont_p);
- return (1);
+ return 1;
}
* (it also serves as the indicator that we are currently loaded).
*/
dso->loaded_filename = filename;
- return (1);
+ return 1;
err:
/* Cleanup! */
OPENSSL_free(filename);
return (0);
}
if (sk_num(dso->meth_data) < 1)
- return (1);
+ return 1;
/* Is this statement legal? */
ptr = (shl_t) sk_pop(dso->meth_data);
if (ptr == NULL) {
return (0);
}
shl_unload(ptr);
- return (1);
+ return 1;
}
static DSO_FUNC_TYPE dl_bind_func(DSO *dso, const char *symname)
}
/* Success */
dso->loaded_filename = filename;
- return (1);
+ return 1;
err:
/* Cleanup! */
OPENSSL_free(filename);
return (0);
}
if (sk_void_num(dso->meth_data) < 1)
- return (1);
+ return 1;
ptr = sk_void_pop(dso->meth_data);
if (ptr == NULL) {
DSOerr(DSO_F_DLFCN_UNLOAD, DSO_R_NULL_HANDLE);
}
/* For now I'm not aware of any errors associated with dlclose() */
dlclose(ptr);
- return (1);
+ return 1;
}
static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
int i;
if (dso == NULL)
- return (1);
+ return 1;
if (CRYPTO_DOWN_REF(&dso->references, &i, dso->lock) <= 0)
return 0;
}
OPENSSL_free(dso->filename);
dso->filename = copied;
- return (1);
+ return 1;
}
char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2)
/* Success (for now, we lie. We actually do not know...) */
dso->loaded_filename = filename;
- return (1);
+ return 1;
err:
/* Cleanup! */
OPENSSL_free(p);
return (0);
}
if (sk_void_num(dso->meth_data) < 1)
- return (1);
+ return 1;
p = (DSO_VMS_INTERNAL *)sk_void_pop(dso->meth_data);
if (p == NULL) {
DSOerr(DSO_F_VMS_UNLOAD, DSO_R_NULL_HANDLE);
}
/* Cleanup */
OPENSSL_free(p);
- return (1);
+ return 1;
}
/*
}
/* Success */
dso->loaded_filename = filename;
- return (1);
+ return 1;
err:
/* Cleanup ! */
OPENSSL_free(filename);
return (0);
}
if (sk_void_num(dso->meth_data) < 1)
- return (1);
+ return 1;
p = sk_void_pop(dso->meth_data);
if (p == NULL) {
DSOerr(DSO_F_WIN32_UNLOAD, DSO_R_NULL_HANDLE);
}
/* Cleanup */
OPENSSL_free(p);
- return (1);
+ return 1;
}
static DSO_FUNC_TYPE win32_bind_func(DSO *dso, const char *symname)
return (-1);
ctx->num = 0;
*outl = i;
- return (1);
+ return 1;
} else
- return (1);
+ return 1;
}
*outl = n;
} else
*outl = 0;
- return (1);
+ return 1;
}
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
== NULL)
return (0);
}
- return (1);
+ return 1;
}
int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
== NULL)
return (0);
}
- return (1);
+ return 1;
}
int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
goto new_attrib;
}
end:
- return (1);
+ return 1;
}
if (!PKCS7_set_content(p7, ret))
goto err;
- return (1);
+ return 1;
err:
PKCS7_free(ret);
return (0);
PKCS7err(PKCS7_F_PKCS7_SET_CONTENT, PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
goto err;
}
- return (1);
+ return 1;
err:
return (0);
}
PKCS7err(PKCS7_F_PKCS7_SET_TYPE, PKCS7_R_UNSUPPORTED_CONTENT_TYPE);
goto err;
}
- return (1);
+ return 1;
err:
return (0);
}
if (!sk_PKCS7_SIGNER_INFO_push(signer_sk, psi))
return 0;
- return (1);
+ return 1;
}
int PKCS7_add_certificate(PKCS7 *p7, X509 *x509)
X509_free(x509);
return 0;
}
- return (1);
+ return 1;
}
int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl)
X509_CRL_free(crl);
return 0;
}
- return (1);
+ return 1;
}
int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
if (!sk_PKCS7_RECIP_INFO_push(sk, ri))
return 0;
- return (1);
+ return 1;
}
int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509)
lh_OPENSSL_STRING_free(db->index[field]);
db->index[field] = idx;
db->qual[field] = qual;
- return (1);
+ return 1;
}
long TXT_DB_write(BIO *out, TXT_DB *db)
}
if (!sk_OPENSSL_PSTRING_push(db->data, row))
goto err1;
- return (1);
+ return 1;
err1:
db->error = DB_ERROR_MALLOC;
int WHIRLPOOL_Init(WHIRLPOOL_CTX *c)
{
memset(c, 0, sizeof(*c));
- return (1);
+ return 1;
}
int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *_inp, size_t bytes)
if (bytes)
WHIRLPOOL_BitUpdate(c, inp, bytes * 8);
- return (1);
+ return 1;
}
void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits)
if (md) {
memcpy(md, c->H.c, WHIRLPOOL_DIGEST_LENGTH);
OPENSSL_cleanse(c, sizeof(*c));
- return (1);
+ return 1;
}
return (0);
}
goto err;
}
- return (1);
+ return 1;
err:
X509err(X509_F_X509_REQ_PRINT_EX, ERR_R_BUF_LIB);
return (0);
}
BIO_printf(bp, "\n");
- return (1);
+ return 1;
err:
OPENSSL_free(der);
return (0);
/* clear any errors */
ERR_clear_error();
- return (1);
+ return 1;
}
int X509_STORE_load_locations(X509_STORE *ctx, const char *file,
}
if ((path == NULL) && (file == NULL))
return (0);
- return (1);
+ return 1;
}
if (version == 0) {
ASN1_INTEGER_free(x->cert_info.version);
x->cert_info.version = NULL;
- return (1);
+ return 1;
}
if (x->cert_info.version == NULL) {
if ((x->cert_info.version = ASN1_INTEGER_new()) == NULL)
if (ex == NULL)
return (0);
ex->critical = (crit) ? 0xFF : -1;
- return (1);
+ return 1;
}
int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data)
i = ASN1_OCTET_STRING_set(&ex->value, data->data, data->length);
if (!i)
return (0);
- return (1);
+ return 1;
}
ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex)
for (i = loc + 1; i < n; i++)
sk_X509_NAME_ENTRY_value(sk, i - 1)->set += 1;
}
- return (1);
+ return 1;
err:
X509_NAME_ENTRY_free(new_name);
return (0);
else
ne->value->type = type;
}
- return (1);
+ return 1;
}
ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne)
return (0);
if (!SSL_copy_session_id(tdata->ssl, (fdata->ssl)))
return 0;
- return (1);
+ return 1;
}
void BIO_ssl_shutdown(BIO *b)
/* Set proper sequence number for mac calculation */
memcpy(&(s->rlayer.read_sequence[2]), &(rdata->packet[5]), 6);
- return (1);
+ return 1;
}
int dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority)
return (-1);
}
- return (1);
+ return 1;
}
int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue)
OPENSSL_free(item->data);
pitem_free(item);
- return (1);
+ return 1;
}
return (0);
wr->input = wr->data;
#endif
- return (1);
+ return 1;
}
/*-
if ((bs != 1) && !sending)
return ssl3_cbc_remove_padding(rec, bs, mac_size);
}
- return (1);
+ return 1;
}
#define MAX_PADDING 256
/* Mark receipt of record. */
dtls1_record_bitmap_update(s, bitmap);
- return (1);
+ return 1;
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
goto again; /* get another record */
}
- return (1);
+ return 1;
}
OPENSSL_cleanse(exp_key, sizeof(exp_key));
OPENSSL_cleanse(exp_iv, sizeof(exp_iv));
- return (1);
+ return 1;
err:
SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_MALLOC_FAILURE);
err2:
SSL_COMP *comp;
if (s->s3->tmp.key_block_length != 0)
- return (1);
+ return 1;
if (!ssl_cipher_get_evp(s->session, &c, &hash, NULL, NULL, &comp, 0)) {
SSLerr(SSL_F_SSL3_SETUP_KEY_BLOCK, SSL_R_CIPHER_OR_HASH_UNAVAILABLE);
default:
return (0);
}
- return (1);
+ return 1;
}
long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
default:
return (0);
}
- return (1);
+ return 1;
}
const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id)
*/
if (s->quiet_shutdown || SSL_in_before(s)) {
s->shutdown = (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN);
- return (1);
+ return 1;
}
if (!(s->shutdown & SSL_SENT_SHUTDOWN)) {
if ((s->shutdown == (SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN)) &&
!s->s3->alert_dispatch)
- return (1);
+ return 1;
else
return (0);
}
int ssl3_renegotiate(SSL *s)
{
if (s->handshake_func == NULL)
- return (1);
+ return 1;
s->s3->renegotiate = 1;
- return (1);
+ return 1;
}
/*
}
s->s3->tmp.peer_finish_md_len = finish_md_len;
- return (1);
+ return 1;
}
int ssl3_send_alert(SSL *s, int level, int desc)
SSLerr(SSL_F_SSL_CTX_SET_SSL_VERSION, SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS);
return (0);
}
- return (1);
+ return 1;
}
SSL *SSL_new(SSL_CTX *ctx)
static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
{
if (a->ssl_version != b->ssl_version)
- return (1);
+ return 1;
if (a->session_id_length != b->session_id_length)
- return (1);
+ return 1;
return (memcmp(a->session_id, b->session_id, a->session_id_length));
}
if (s == NULL)
return (0);
s->timeout = t;
- return (1);
+ return 1;
}
long SSL_SESSION_get_timeout(const SSL_SESSION *s)
return (0);
s->ext.session_secret_cb = tls_session_secret_cb;
s->ext.session_secret_cb_arg = arg;
- return (1);
+ return 1;
}
int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb,
return (0);
s->ext.session_ticket_cb = cb;
s->ext.session_ticket_cb_arg = arg;
- return (1);
+ return 1;
}
int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len)
!(s->shutdown & SSL_SENT_SHUTDOWN) &&
!(SSL_in_init(s) || SSL_in_before(s))) {
SSL_CTX_remove_session(s->session_ctx, s->session);
- return (1);
+ return 1;
} else
return (0);
}
x->flags & SSL_SESS_FLAG_EXTMS ? "yes" : "no") <= 0)
goto err;
- return (1);
+ return 1;
err:
return (0);
}
if (BIO_puts(bp, "\n") <= 0)
goto err;
- return (1);
+ return 1;
err:
return (0);
}
s->msg_callback(1, s->version, type, s->init_buf->data,
(size_t)(s->init_off + s->init_num), s,
s->msg_callback_arg);
- return (1);
+ return 1;
}
s->init_off += written;
s->init_num -= written;
OPENSSL_cleanse(tmp2, sizeof(tmp1));
OPENSSL_cleanse(iv1, sizeof(iv1));
OPENSSL_cleanse(iv2, sizeof(iv2));
- return (1);
+ return 1;
err:
SSLerr(SSL_F_TLS1_CHANGE_CIPHER_STATE, ERR_R_MALLOC_FAILURE);
err2:
int ret = 0;
if (s->s3->tmp.key_block_length != 0)
- return (1);
+ return 1;
if (!ssl_cipher_get_evp(s->session, &c, &hash, &mac_type, &mac_secret_size,
&comp, s->ext.use_etm)) {
BN_free(ctx->srp_ctx.v);
memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
ctx->srp_ctx.strength = SRP_MINIMAL_N;
- return (1);
+ return 1;
}
int SSL_SRP_CTX_free(struct ssl_st *s)
BN_free(s->srp_ctx.v);
memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
s->srp_ctx.strength = SRP_MINIMAL_N;
- return (1);
+ return 1;
}
int SSL_SRP_CTX_init(struct ssl_st *s)
}
s->srp_ctx.srp_Mask = ctx->srp_ctx.srp_Mask;
- return (1);
+ return 1;
err:
OPENSSL_free(s->srp_ctx.login);
OPENSSL_free(s->srp_ctx.info);
memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
ctx->srp_ctx.strength = SRP_MINIMAL_N;
- return (1);
+ return 1;
}
/* server side */