Gentoo Archives: gentoo-user

From: Matthew Finkel <matthew.finkel@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] {OT} Can I retrieve my SSL key?
Date: Thu, 18 Aug 2011 07:19:49
Message-Id: CAGF8hsu46_y5B8z0d7=LEC3GOGNRK3rD7-6RNVE-UShOrtEQaw@mail.gmail.com
In Reply to: Re: [gentoo-user] {OT} Can I retrieve my SSL key? by Michael Mol
1 On Wed, Aug 17, 2011 at 10:24 PM, Michael Mol <mikemol@×××××.com> wrote:
2
3 > On Wed, Aug 17, 2011 at 9:45 PM, Francisco Blas Izquierdo Riera (klondike)
4 > <klondike@g.o> wrote:
5 >
6 >> El 18/08/11 03:37, Grant escribió:
7 >> >>> I just accidentally overwrote my SSL certificate key. Is there any
8 >> >>> way to retrieve it? Possibly some sort of export since I haven't
9 >> >>> restarted apache2 yet?
10 >> >> What, exactly, did you do that caused the overwrite?
11 >> > I generated a new key but used the wrong filename so it overwrote a
12 >> > key that has an associated certificate.
13 >> Hopefully you can still ext3undelete it Worst case you have to parse the
14 >> whole disk looking for a pattern with a custom C program (AHH the pain!)
15 >>
16 >> There are file carver tools I've not had any luck with them, though.
17 >
18 >
19 > --
20 > :wq
21 >
22
23
24 As Francisco mentioned, depending on the filesystem you're using, there may
25 exist an 'undelete' tool which came with the util package. If not, then
26 assuming you have at least a few gigs of free space on your drive/partition
27 the chances that the file was /actually/ overwritten are quite slim, so the
28 cert is most likely still there. Any decent "data recovery" program should
29 be able to find it (and just about every single other file you've ever
30 deleted). I wish I could recommend one, but I thankfully have not needed one
31 recently (hopefully this won't jinx it :) ).
32
33 Good Luck!
34
35 - Matt