openssl-0.9.8
vs2005
其它安装都还好,
但只有一个openssl 的VC工程 for openssl-0.9.7e/f的工程(vc6),
我只得用它解压到C:\openssl-0.9.8\Msvc097目录下,并编译(从vc6转至vs2005),除警告外,主要的error有两方面:
1)warning treated as error - no 'object' file generated
代码是
strncpy(objtmp, cnf->name, objlen);
objtmp[objlen] = 0;
acc->method = OBJ_txt2obj(objtmp, 0);
if(!acc->method) {
......
的第一句编译错误(v3_info.c)2)Error 44 fatal error C1083: Cannot open include file: 'openssl/mdc2.h': No such file or directory c:\openssl-0.9.8\crypto\mdc2\mdc2_one.c 61
vs2005
其它安装都还好,
但只有一个openssl 的VC工程 for openssl-0.9.7e/f的工程(vc6),
我只得用它解压到C:\openssl-0.9.8\Msvc097目录下,并编译(从vc6转至vs2005),除警告外,主要的error有两方面:
1)warning treated as error - no 'object' file generated
代码是
strncpy(objtmp, cnf->name, objlen);
objtmp[objlen] = 0;
acc->method = OBJ_txt2obj(objtmp, 0);
if(!acc->method) {
......
的第一句编译错误(v3_info.c)2)Error 44 fatal error C1083: Cannot open include file: 'openssl/mdc2.h': No such file or directory c:\openssl-0.9.8\crypto\mdc2\mdc2_one.c 61
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval)
{
AUTHORITY_INFO_ACCESS *ainfo = NULL;
CONF_VALUE *cnf, ctmp;
ACCESS_DESCRIPTION *acc;
int i, objlen;
char *objtmp, *ptmp; if(!(ainfo = sk_ACCESS_DESCRIPTION_new_null())) {
X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
return NULL;
}
for(i = 0; i < sk_CONF_VALUE_num(nval); i++) {
cnf = sk_CONF_VALUE_value(nval, i);
if(!(acc = ACCESS_DESCRIPTION_new())
|| !sk_ACCESS_DESCRIPTION_push(ainfo, acc)) {
X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
goto err;
}
ptmp = strchr(cnf->name, ';');
if(!ptmp) {
X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,X509V3_R_INVALID_SYNTAX);
goto err;
}
objlen = ptmp - cnf->name;
ctmp.name = ptmp + 1;
ctmp.value = cnf->value;
if(!v2i_GENERAL_NAME_ex(acc->location, method, ctx, &ctmp, 0))
goto err;
if(!(objtmp = OPENSSL_malloc(objlen + 1))) {
X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,ERR_R_MALLOC_FAILURE);
goto err;
}
strncpy(objtmp, cnf->name, objlen);
objtmp[objlen] = 0; acc->method = OBJ_txt2obj(objtmp, 0);
if(!acc->method) {
X509V3err(X509V3_F_V2I_AUTHORITY_INFO_ACCESS,X509V3_R_BAD_OBJECT);
ERR_add_error_data(2, "value=", objtmp);
OPENSSL_free(objtmp);
goto err;
}
OPENSSL_free(objtmp); }
return ainfo;
err:
sk_ACCESS_DESCRIPTION_pop_free(ainfo, ACCESS_DESCRIPTION_free);
return NULL;
}
我把问题简化了.strncpy(objtmp, cnf->name, objlen);这一句有错:warning treated as error - no 'object' file generated ,请大家帮忙看看