Latest update.

This commit is contained in:
2020-01-17 19:45:12 +09:00
parent 016df9f433
commit 0f7abb4eb6
1100 changed files with 47785 additions and 16292 deletions
+5 -2
View File
@@ -1,6 +1,8 @@
# We make separate GOAL variables for each algorithm, to make it easy to
# switch each to the Legacy provider when needed.
$COMMON_GOAL=../../libcommon.a
$SHA1_GOAL=../../libimplementations.a
$SHA2_GOAL=../../libimplementations.a
$SHA3_GOAL=../../libimplementations.a
@@ -14,11 +16,12 @@ $MDC2_GOAL=../../liblegacy.a
$WHIRLPOOL_GOAL=../../liblegacy.a
$RIPEMD_GOAL=../../liblegacy.a
# This source is common for all digests in all our providers.
SOURCE[$COMMON_GOAL]=digestcommon.c
SOURCE[$SHA2_GOAL]=sha2_prov.c
SOURCE[$SHA3_GOAL]=sha3_prov.c
$GOAL=../../libimplementations.a
IF[{- !$disabled{blake2} -}]
SOURCE[$BLAKE2_GOAL]=blake2_prov.c blake2b_prov.c blake2s_prov.c
ENDIF
@@ -0,0 +1,46 @@
/*
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include "openssl/err.h"
#include "prov/digestcommon.h"
#include "prov/providercommonerr.h"
int digest_default_get_params(OSSL_PARAM params[], size_t blksz, size_t paramsz,
unsigned long flags)
{
OSSL_PARAM *p = NULL;
p = OSSL_PARAM_locate(params, OSSL_DIGEST_PARAM_BLOCK_SIZE);
if (p != NULL && !OSSL_PARAM_set_size_t(p, blksz)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
p = OSSL_PARAM_locate(params, OSSL_DIGEST_PARAM_SIZE);
if (p != NULL && !OSSL_PARAM_set_size_t(p, paramsz)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
p = OSSL_PARAM_locate(params, OSSL_DIGEST_PARAM_FLAGS);
if (p != NULL && !OSSL_PARAM_set_ulong(p, flags)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
return 1;
}
static const OSSL_PARAM digest_default_known_gettable_params[] = {
OSSL_PARAM_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, NULL),
OSSL_PARAM_size_t(OSSL_DIGEST_PARAM_SIZE, NULL),
OSSL_PARAM_ulong(OSSL_DIGEST_PARAM_FLAGS, NULL),
OSSL_PARAM_END
};
const OSSL_PARAM *digest_default_gettable_params(void)
{
return digest_default_known_gettable_params;
}
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
/*
* MD2 low level APIs are deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"
#include <openssl/crypto.h>
#include <openssl/md2.h>
#include "prov/digestcommon.h"
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
/*
* MD4 low level APIs are deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"
#include <openssl/crypto.h>
#include <openssl/md4.h>
#include "prov/digestcommon.h"
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
/*
* MDC2 low level APIs are deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"
#include <openssl/crypto.h>
#include <openssl/params.h>
#include <openssl/mdc2.h>
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
/*
* RIPEMD160 low level APIs are deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"
#include <openssl/crypto.h>
#include <openssl/ripemd.h>
#include "prov/digestcommon.h"
@@ -241,7 +241,8 @@ static void *keccak_dupctx(void *ctx)
KECCAK1600_CTX *in = (KECCAK1600_CTX *)ctx;
KECCAK1600_CTX *ret = OPENSSL_malloc(sizeof(*ret));
*ret = *in;
if (ret != NULL)
*ret = *in;
return ret;
}
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
/*
* Whirlpool low level APIs are deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"
#include <openssl/crypto.h>
#include <openssl/whrlpool.h>
#include "prov/digestcommon.h"