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
+4 -1
View File
@@ -1,2 +1,5 @@
LIBS=../../libcrypto
SOURCE[../../libcrypto]=sm3.c m_sm3.c
IF[{- !$disabled{sm3} -}]
SOURCE[../../libcrypto]=sm3.c legacy_sm3.c
ENDIF
+30
View File
@@ -0,0 +1,30 @@
/*
* Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2017 Ribose Inc. 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 "crypto/evp.h"
#include "../evp/legacy_meth.h"
#include "internal/sm3.h"
IMPLEMENT_LEGACY_EVP_MD_METH_LC(sm3_int, sm3)
static const EVP_MD sm3_md = {
NID_sm3,
NID_sm3WithRSAEncryption,
SM3_DIGEST_LENGTH,
0,
LEGACY_EVP_MD_METH_TABLE(sm3_int_init, sm3_int_update, sm3_int_final, NULL,
SM3_CBLOCK),
};
const EVP_MD *EVP_sm3(void)
{
return &sm3_md;
}
-52
View File
@@ -1,52 +0,0 @@
/*
* Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2017 Ribose Inc. 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 "internal/cryptlib.h"
#ifndef OPENSSL_NO_SM3
# include <openssl/evp.h>
# include "internal/sm3.h"
# include "crypto/evp.h"
static int init(EVP_MD_CTX *ctx)
{
return sm3_init(EVP_MD_CTX_md_data(ctx));
}
static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
{
return sm3_update(EVP_MD_CTX_md_data(ctx), data, count);
}
static int final(EVP_MD_CTX *ctx, unsigned char *md)
{
return sm3_final(md, EVP_MD_CTX_md_data(ctx));
}
static const EVP_MD sm3_md = {
NID_sm3,
NID_sm3WithRSAEncryption,
SM3_DIGEST_LENGTH,
0,
init,
update,
final,
NULL,
NULL,
SM3_CBLOCK,
sizeof(EVP_MD *) + sizeof(SM3_CTX),
};
const EVP_MD *EVP_sm3(void)
{
return &sm3_md;
}
#endif