Fix piv-tool on wondows
fopen needs "rb" for fopen in two places fixes #2338 On branch piv-tool-windows Changes to be committed: modified: piv-tool.c
This commit is contained in:
parent
8dfafe4fc2
commit
f1bc07dec1
|
@ -118,7 +118,7 @@ static int load_object(const char * object_id, const char * object_file)
|
||||||
int r = -1;
|
int r = -1;
|
||||||
struct stat stat_buf;
|
struct stat stat_buf;
|
||||||
|
|
||||||
if(!object_file || (fp=fopen(object_file, "r")) == NULL){
|
if(!object_file || (fp=fopen(object_file, "rb")) == NULL){
|
||||||
printf("Cannot open object file, %s %s\n",
|
printf("Cannot open object file, %s %s\n",
|
||||||
(object_file)?object_file:"", strerror(errno));
|
(object_file)?object_file:"", strerror(errno));
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -184,7 +184,7 @@ static int load_cert(const char * cert_id, const char * cert_file,
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((fp=fopen(cert_file, "r"))==NULL){
|
if((fp=fopen(cert_file, "rb"))==NULL){
|
||||||
printf("Cannot open cert file, %s %s\n",
|
printf("Cannot open cert file, %s %s\n",
|
||||||
cert_file, strerror(errno));
|
cert_file, strerror(errno));
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in New Issue