/srv/irclogs.ubuntu.com/2023/09/05/#ubuntu-security.txt

=== chris14_ is now known as chris14
hwpplayer1hi people !10:43
hwpplayer1sarnold: hi10:44
=== crazybyte2 is now known as crazybyte
=== cpaelzer_ is now known as cpaelzer
smoserhi. I'm wondering if there is an advisable way to solve a problem i'm seeing.17:07
smoseri have a supplied p7b file that represents a list of to-be-trusted certificate authorities.17:09
smoserthat is intended to be the entire set.17:09
smoseri can't really avoid ca-certificates getting installed, as it is a dependency (Depends, not just Recommends) of many packages.17:10
smoseris there a recommended path for acheiving this?  I want to only trust "my" list.17:11
smoserthe thing i'm missing is how i can avoid having an 'apt-get install' or 'upgrade' command adding the Ubuntu certs to the search list.17:12
sdezielsmoser: I guess that depends on what software you'd like to use your "custom CA root set"? I know postfix for example can be told to use any directory for that17:14
smoserideally "all software". basically anything using openssl.17:16
smoserand, yeah, for things that have other "custom" locations, i understand i would have to address those separately.17:16
sdezielsmoser: so maybe add your custom CA root set to `/usr/local/share/ca-certificates/`, then run `update-ca-certificates` to distrust the official roots and only keep yours17:27
sdezielsmoser: maybe you can be creative and use a hook script (`/etc/ca-certificates/update.d`) to do that when updates are pushed?17:29
smoseryeah, i'd thought about the update.d dir.17:37
smoserwhat did you mean "to distrust the offical roots" ? 17:38
smoseri thought it unioned /usr/share/ca-certificates/ and /usr/local/share/ca-certificates/17:38
smoseri'd also thought of just dpkg-divert'ing update-ca-certificates, and replacing it with my own.17:41
=== crazybyte2 is now known as crazybyte
sdezielsmoser: `dpkg-reconconfigure ca-certificates` can ask you for each of the root CAs to trust, by default they are all trusted but you can remove them all if you wish18:40
sdezielsmoser: I just went on and removed them all and the debconf equivalent seems to be:18:44
sdezielroot@j:~# debconf-show ca-certificates18:44
sdeziel* ca-certificates/enable_crts:18:44
sdeziel  ca-certificates/new_crts:18:45
sdeziel* ca-certificates/trust_new_crts: ask18:45
sdeziel  ca-certificates/title:18:45
sdezielprior to removing them all from the trusted list, they all appeared in `ca-certificates/enable_crts`18:45
smoserthat just edits /etc/ca-certificates.conf, right?19:08
smoserso what would you think about19:08
smoser1. install package19:08
smoser2. sed -i '/^[^#!]/s/^/!/'  /etc/ca-certificates.conf19:08
smoser3. printf "%s\t%s\t%s\t%s\n" ca-certificates ca-certificates/enable_crts select no | debconf-set-selections --checkonly19:08
smoser4. dpkg-reconfigure ca-certificates --frontend=noninteractive19:08
smoserooops. drop the '--checkonly' from set-selections of course.19:09
smoserbah. '3' should have been:19:14
smoser printf "%s\t%s\t%s\t%s\n" ca-certificates ca-certificates/trust_new_crts select no | debconf-set-selections19:14
sdezielsmoser: ah I didn't know it was simply editing `/etc/ca-certificates.conf` so yeah that looks good except that apparently removing all cert doesn't create an empty `/etc/ssl/certs/ca-certificates.crt`, it remains unaltered with the full CA list19:26
=== hank_ is now known as hank

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!