early-access version 2698

This commit is contained in:
pineappleEA
2022-04-24 22:29:35 +02:00
parent c96f949832
commit caa0c2911b
486 changed files with 37806 additions and 14362 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: m_sm3.c,v 1.1 2018/11/11 06:53:31 tb Exp $ */
/* $OpenBSD: m_sm3.c,v 1.3 2022/01/14 08:38:06 tb Exp $ */
/*
* Copyright (c) 2018, Ribose Inc
*
@@ -25,6 +25,8 @@
#include <openssl/rsa.h>
#endif
#include "evp_locl.h"
static int
sm3_init(EVP_MD_CTX *ctx)
{
@@ -47,19 +49,12 @@ static const EVP_MD sm3_md = {
.type = NID_sm3,
.pkey_type = NID_sm3WithRSAEncryption,
.md_size = SM3_DIGEST_LENGTH,
.flags = EVP_MD_FLAG_PKEY_METHOD_SIGNATURE|EVP_MD_FLAG_DIGALGID_ABSENT,
.flags = EVP_MD_FLAG_DIGALGID_ABSENT,
.init = sm3_init,
.update = sm3_update,
.final = sm3_final,
.copy = NULL,
.cleanup = NULL,
#ifndef OPENSSL_NO_RSA
.sign = (evp_sign_method *)RSA_sign,
.verify = (evp_verify_method *)RSA_verify,
.required_pkey_type = {
EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0,
},
#endif
.block_size = SM3_CBLOCK,
.ctx_size = sizeof(EVP_MD *) + sizeof(SM3_CTX),
};