return 1;
}
+#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
if(st.st_mode & 077) {
fprintf(stderr, "WARNING: unsafe file permissions on %s.\n", fname);
if(st.st_uid != uid) {
fprintf(stderr, "Fixed permissions of %s.\n", fname);
}
}
+#endif
}
#endif
return 1;
}
+#if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN)
if(st.st_mode & 077) {
fprintf(stderr, "WARNING: unsafe file permissions on %s.\n", fname);
if(st.st_uid != uid) {
fprintf(stderr, "Fixed permissions of %s.\n", fname);
}
}
+#endif
}
#ifdef DISABLE_LEGACY
rsa_t *rsa_pub = NULL;
f = fopen(fname, "r");
- if(f)
+ if(f) {
rsa_pub = rsa_read_pem_public_key(f);
- fclose(f);
+ fclose(f);
+ }
if(rsa_priv) {
if(!rsa_pub) {
f = fopen(fname, "r");
if(f) {
ecdsa_pub = get_pubkey(f);
- if(!f) {
+ if(!ecdsa_pub) {
rewind(f);
ecdsa_pub = ecdsa_read_pem_public_key(f);
}
+ fclose(f);
}
- fclose(f);
if(ecdsa_priv) {
if(!ecdsa_pub) {