projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
If LOCALSTATEDIR is inaccessible, store the pid and socket files in the configuration...
[tinc]
/
src
/
sptps_test.c
diff --git
a/src/sptps_test.c
b/src/sptps_test.c
index
95bfda8
..
38c2c08
100644
(file)
--- a/
src/sptps_test.c
+++ b/
src/sptps_test.c
@@
-271,11
+271,19
@@
int main(int argc, char *argv[]) {
crypto_init();
FILE *fp = fopen(argv[1], "r");
crypto_init();
FILE *fp = fopen(argv[1], "r");
+ if(!fp) {
+ fprintf(stderr, "Could not open %s: %s\n", argv[1], strerror(errno));
+ return 1;
+ }
if(!(mykey = ecdsa_read_pem_private_key(fp)))
return 1;
fclose(fp);
fp = fopen(argv[2], "r");
if(!(mykey = ecdsa_read_pem_private_key(fp)))
return 1;
fclose(fp);
fp = fopen(argv[2], "r");
+ if(!fp) {
+ fprintf(stderr, "Could not open %s: %s\n", argv[2], strerror(errno));
+ return 1;
+ }
if(!(hiskey = ecdsa_read_pem_public_key(fp)))
return 1;
fclose(fp);
if(!(hiskey = ecdsa_read_pem_public_key(fp)))
return 1;
fclose(fp);