在精通PKI网络安全证技术与编程实现一书中的例子代码有错
原书
申明加密字符 char *msg="Hello OpenSSL";
rv=EVP_EncryptUpdate(&ctx,out,&outl,msg,strlen(msg));
在vc6++ 下编译不能通过
应改为
char msg[]="Hello OpenSSLjkljllkl";
rv=EVP_EncryptUpdate(&ctx,out,&outl,(const unsigned char *)msg,strlen(msg));
输出:

本文修正了一本书中关于PKI网络安全证书技术与编程实现的例子代码错误,并提供了在VC6++环境下能正常运行的修改版代码,详细解释了如何正确使用OpenSSL进行加密。
909





