Version bump
This commit is contained in:
+17
-5
@@ -17,6 +17,7 @@
|
||||
#include "internal/evp_int.h"
|
||||
#include "modes_lcl.h"
|
||||
#include <openssl/rand.h>
|
||||
#include <internal/rand.h>
|
||||
#include "evp_locl.h"
|
||||
|
||||
typedef struct {
|
||||
@@ -1404,8 +1405,14 @@ static int s390x_aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
|
||||
memcpy(gctx->iv, ptr, arg);
|
||||
|
||||
enc = EVP_CIPHER_CTX_encrypting(c);
|
||||
if (enc && RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0)
|
||||
return 0;
|
||||
if (enc) {
|
||||
if (c->drbg != NULL) {
|
||||
if (RAND_DRBG_bytes(c->drbg, gctx->iv + arg, gctx->ivlen - arg) == 0)
|
||||
return 0;
|
||||
} else if (RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
gctx->iv_gen = 1;
|
||||
return 1;
|
||||
@@ -2632,9 +2639,14 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
|
||||
return 0;
|
||||
if (arg)
|
||||
memcpy(gctx->iv, ptr, arg);
|
||||
if (EVP_CIPHER_CTX_encrypting(c)
|
||||
&& RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0)
|
||||
return 0;
|
||||
if (EVP_CIPHER_CTX_encrypting(c)) {
|
||||
if (c->drbg != NULL) {
|
||||
if (RAND_DRBG_bytes(c->drbg, gctx->iv + arg, gctx->ivlen - arg) == 0)
|
||||
return 0;
|
||||
} else if (RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
gctx->iv_gen = 1;
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user