Latest update.

This commit is contained in:
2019-05-23 12:02:56 +09:00
parent a7bf77581f
commit 64d458de91
185 changed files with 5859 additions and 2853 deletions
+10 -3
View File
@@ -235,16 +235,23 @@ static int aes_stream_final(void *vctx, unsigned char *out, size_t *outl,
return 1;
}
static int aes_cipher(void *vctx, unsigned char *out, const unsigned char *in,
size_t inl)
static int aes_cipher(void *vctx,
unsigned char *out, size_t *outl, size_t outsize,
const unsigned char *in, size_t inl)
{
PROV_AES_KEY *ctx = (PROV_AES_KEY *)vctx;
if (outsize < inl) {
PROVerr(PROV_F_AES_CIPHER, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
return 0;
}
if (!ctx->ciph->cipher(ctx, out, in, inl)) {
PROVerr(PROV_F_AES_CIPHER, PROV_R_CIPHER_OPERATION_FAILED);
return 0;
}
*outl = inl;
return 1;
}
@@ -263,7 +270,7 @@ static int aes_cipher(void *vctx, unsigned char *out, const unsigned char *in,
#define IMPLEMENT_new_ctx(lcmode, UCMODE, len) \
static OSSL_OP_cipher_newctx_fn aes_##len##_##lcmode##_newctx; \
static void *aes_##len##_##lcmode##_newctx(void) \
static void *aes_##len##_##lcmode##_newctx(void *provctx) \
{ \
PROV_AES_KEY *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
\
+4 -2
View File
@@ -1,3 +1,4 @@
/*
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
*
@@ -9,12 +10,13 @@
#include <openssl/aes.h>
#include <openssl/modes.h>
#include "internal/cryptlib.h"
typedef struct prov_aes_cipher_st PROV_AES_CIPHER;
typedef struct prov_aes_key_st {
union {
double align;
OSSL_UNION_ALIGN;
AES_KEY ks;
} ks;
block128_f block;
@@ -29,7 +31,7 @@ typedef struct prov_aes_key_st {
#if defined(OPENSSL_CPUID_OBJ) && defined(__s390__)
struct {
union {
double align;
OSSL_UNION_ALIGN;
/*-
* KM-AES parameter block - begin
* (see z/Architecture Principles of Operation >= SA22-7832-06)
+1 -1
View File
@@ -40,7 +40,7 @@ static int sha256_final(void *ctx,
return 0;
}
static void *sha256_newctx(void)
static void *sha256_newctx(void *provctx)
{
SHA256_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));