ref: 6354bd07282ba7c397c563a6039dae65611a6ecd
parent: dd076567a41ad6600b1f332f473567df01083f07
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Feb 27 21:08:59 EST 2014
libsec: skip missing thumbprint files; not an error
--- a/sys/src/libsec/port/thumb.c
+++ b/sys/src/libsec/port/thumb.c
@@ -34,6 +34,8 @@
{
Thumbprint *hd, *p;
+ if(table == nil)
+ return 0;
hd = tablehead(sum, table);
for(p = hd->next; p; p = p->next){
if(memcmp(sum, p->sha1, SHA1dlen) == 0)
@@ -52,6 +54,8 @@
uchar sum[SHA1dlen];
Biobuf *bin;
+ if(access(file, AEXIST) < 0)
+ return 0; /* not an error */
if((bin = Bopen(file, OREAD)) == nil)
return -1;
for(; (line = Brdstr(bin, '\n', 1)) != nil; free(line)){
@@ -114,4 +118,3 @@
freeThumbprints(crltab);
return table;
}
-