Home > Back-end >  Openssl use
Openssl use

Time:11-23

Before have not used the openssl 1.1.0 version above and win10 Vs2015

At present the problems mainly has the following two:

1, compile always need to add the include the header file
Report the results of such as defining EVP_MD_CTX evp_sha only evp. H error:
Cert. H (202) : error C2079: "evp_sha use undefined" struct "evp_md_ctx_st
"
Add evp_locl. H file, an error:
Evp_locl. H (30) : error C2065: "EVP_MAX_IV_LENGTH" : no statement of identifiers

Rsa. H is also such a situation, you need to add rsa_locl. H

People should not be so, to be the problem?


2, the following code,

EVP_PKEY * k;
RSA * RSA;
int i;
Unsigned char dat [512], * dat1;

K=X509_get_pubkey (usrCert [0]);
Rsa=EVP_PKEY_get1_RSA (k);

printf("\n");
Dat1=(usrCert [0] - & gt; Signature). The data;
I=RSA_public_encrypt (256, dat1, dat, rsa, RSA_NO_PADDING);

The results I=0; Returns the result of a dat, of course, is not correct,

To be the problem? Consult everybody down

CodePudding user response:

Openssl1.1.1 version without evp_locl. J h, is this why
  • Related