public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrea Conti <alyf@alyf.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] {OT} Can I retrieve my SSL key?
Date: Thu, 18 Aug 2011 12:09:49 +0200	[thread overview]
Message-ID: <4E4CE4ED.8050504@alyf.net> (raw)
In-Reply-To: <CAN0CFw0qpWXynPAKBRE+HQ2OrCLTad4GLvojAppSUJa29Q2ukA@mail.gmail.com>

On 18/08/11 03.23, Grant wrote:
> I just accidentally overwrote my SSL certificate key.  Is there any
> way to retrieve it?  Possibly some sort of export since I haven't
> restarted apache2 yet?

If apache keeps the certificate file open after reading it (I doubt
that's the case, but if you have lsof installed you should check just to
make sure) and you didn't restart it, you could try this method:

http://computer-forensics.sans.org/blog/2009/01/27/recovering-open-but-unlinked-file-data

Otherwise, assuming you're on ext2/ext3, ext3undel works quite well,
*provided that you stop any writes to the affected volume ASAP*, e.g. by
remounting it read-only.

If the data hasn't been overwritten, carving tools should work too, as
the ASCII-armor of the certificate provides an easily recognizable
pattern and the file is almost certainly small enough to fit within a
single FS block.

andrea




      parent reply	other threads:[~2011-08-18 10:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18  1:23 [gentoo-user] {OT} Can I retrieve my SSL key? Grant
2011-08-18  1:27 ` Michael Mol
2011-08-18  1:37   ` Grant
2011-08-18  1:45     ` Francisco Blas Izquierdo Riera (klondike)
2011-08-18  1:59       ` Grant
2011-08-18  2:24       ` Michael Mol
2011-08-18  7:18         ` Matthew Finkel
2011-08-18  8:36       ` Neil Bothwick
2011-08-18  9:41         ` Adam Carter
2011-08-18 10:09 ` Andrea Conti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4CE4ED.8050504@alyf.net \
    --to=alyf@alyf.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox