projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure RSA PSS correctly returns the right default digest
[oweals/openssl.git]
/
crypto
/
evp
/
bio_enc.c
diff --git
a/crypto/evp/bio_enc.c
b/crypto/evp/bio_enc.c
index 366e2e928b51e62058432bfe0bc2e347112ff633..6639061eae9ae392672881ba10be3cc5cbd613e6 100644
(file)
--- a/
crypto/evp/bio_enc.c
+++ b/
crypto/evp/bio_enc.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 1995-201
6
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-201
8
The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@
-19,7
+19,7
@@
static int enc_read(BIO *h, char *buf, int size);
static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int enc_new(BIO *h);
static int enc_free(BIO *data);
static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int enc_new(BIO *h);
static int enc_free(BIO *data);
-static long enc_callback_ctrl(BIO *h, int cmd,
bio
_info_cb *fps);
+static long enc_callback_ctrl(BIO *h, int cmd,
BIO
_info_cb *fps);
#define ENC_BLOCK_SIZE (1024*4)
#define ENC_MIN_CHUNK (256)
#define BUF_OFFSET (ENC_MIN_CHUNK + EVP_MAX_BLOCK_LENGTH)
#define ENC_BLOCK_SIZE (1024*4)
#define ENC_MIN_CHUNK (256)
#define BUF_OFFSET (ENC_MIN_CHUNK + EVP_MAX_BLOCK_LENGTH)
@@
-65,9
+65,10
@@
static int enc_new(BIO *bi)
{
BIO_ENC_CTX *ctx;
{
BIO_ENC_CTX *ctx;
- ctx = OPENSSL_zalloc(sizeof(*ctx));
- if (ctx == NULL)
+ if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
+ EVPerr(EVP_F_ENC_NEW, ERR_R_MALLOC_FAILURE);
return 0;
return 0;
+ }
ctx->cipher = EVP_CIPHER_CTX_new();
if (ctx->cipher == NULL) {
ctx->cipher = EVP_CIPHER_CTX_new();
if (ctx->cipher == NULL) {
@@
-385,7
+386,7
@@
static long enc_ctrl(BIO *b, int cmd, long num, void *ptr)
return ret;
}
return ret;
}
-static long enc_callback_ctrl(BIO *b, int cmd,
bio
_info_cb *fp)
+static long enc_callback_ctrl(BIO *b, int cmd,
BIO
_info_cb *fp)
{
long ret = 1;
BIO *next = BIO_next(b);
{
long ret = 1;
BIO *next = BIO_next(b);