Manage ownership and permissions on keys and certs
Learn to set the owner and permissions on keys and certificates. When
generating a new key or CSR (in case we're doing a 'resubmit' after
someone decided to change what the permissions should be), or saving the
issued certificate to its proper location, adjust the underlying files
(just the key when generating the key and CSR, both key and certificate
when saving the certificate).
For PEM files, this is simple, because most of the time we already have
the file descriptors within easy reach. For NSS, we make some
assumptions based on the type of database being used and do the best
that we can.