mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-09 23:43:41 +08:00
fast SMS4 with Intel AVX2/KNC-NI
This commit is contained in:
@@ -94,14 +94,14 @@ static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_EC
|
||||
&eckey_asn1_meth,
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
&sm2_asn1_meth,
|
||||
#endif
|
||||
&hmac_asn1_meth,
|
||||
&cmac_asn1_meth,
|
||||
#ifndef OPENSSL_NO_DH
|
||||
&dhx_asn1_meth
|
||||
&dhx_asn1_meth,
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
&sm2_asn1_meth,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -165,33 +165,6 @@ static const EVP_PKEY_ASN1_METHOD *pkey_asn1_find(int type)
|
||||
}
|
||||
ret = OBJ_bsearch_ameth(&t, standard_methods, sizeof(standard_methods)
|
||||
/ sizeof(EVP_PKEY_ASN1_METHOD *));
|
||||
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
//FIXME: i dont know why sm2_asn1_meth can not be found
|
||||
/*
|
||||
{
|
||||
int i;
|
||||
for (i = 0;
|
||||
i < sizeof(standard_methods) / sizeof(EVP_PKEY_ASN1_METHOD *); i++)
|
||||
fprintf(stderr, "Number %d id=%d (%s)\n", i,
|
||||
standard_methods[i]->pkey_id,
|
||||
OBJ_nid2sn(standard_methods[i]->pkey_id));
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
fprintf(stderr, "%s:%d: type = %d, NID_sm2 = %d\n", __FILE__, __LINE__,
|
||||
type, NID_sm2p256v1);
|
||||
if (ret == NULL) {
|
||||
fprintf(stderr, "shit, not found!");
|
||||
}
|
||||
*/
|
||||
|
||||
if (type == EVP_PKEY_SM2) {
|
||||
return &sm2_asn1_meth;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ret || !*ret)
|
||||
return NULL;
|
||||
return *ret;
|
||||
@@ -234,8 +207,6 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
|
||||
int i;
|
||||
const EVP_PKEY_ASN1_METHOD *ameth;
|
||||
|
||||
printf("%s:%d: EVP_PKEY_asn1_find_str(%s)\n", __FILE__, __LINE__, str);
|
||||
|
||||
if (len == -1)
|
||||
len = strlen(str);
|
||||
if (pe) {
|
||||
|
||||
Reference in New Issue
Block a user