[lib] better handling for certs