this patch is largely from cinap.
libsec: improve thumbprint code
1) handle errors when loading thumbprint file.
initThumbprints() now returns nil and sets errstr
on error. a syntax error in a thumbprint file
should be reported instead of silently ignored.
(users seem ok.)
2) fix memory leak in initThumbprints(); we have to use
freeThumbprints() instead of free to release crltab.
3) use the actual head entries for thumbprint
storage in the thumbprints array. most thumbprint
files are rather sparse.
4) remove private emalloc() function. since this
is library code, let the application deal with the
error.
|