From 189d6eea2697e6496d8594e0a86217587f687967 Mon Sep 17 00:00:00 2001 From: Blake Griffith Date: Tue, 29 Dec 2015 08:19:47 -0600 Subject: [PATCH] Add check that symlinks exist. --- letsencrypt/storage.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/letsencrypt/storage.py b/letsencrypt/storage.py index 08b48ff5e..9b2b1705a 100644 --- a/letsencrypt/storage.py +++ b/letsencrypt/storage.py @@ -128,6 +128,15 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes self.fullchain = self.configuration["fullchain"] self._fix_symlinks() + self._check_symlinks() + + def _check_symlinks(self): + def check(link): + return os.path.exists(os.path.realpath(link)) + for kind in ALL_FOUR: + if not check(getattr(self, kind)): + raise errors.CertStorageError( + "link: {0} does not exist".format(getattr(self, kind))) def _consistent(self): """Are the files associated with this lineage self-consistent?