summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-22 11:44:50 +0100
committerCarl Hetherington <cth@carlh.net>2016-04-22 11:44:50 +0100
commited81e7f34255c4cde953ae6fa4148dd7edb362fa (patch)
treefbc30f4de53ce5c790a03283e9651d2039bfb163 /src
parent6f4466c962a81b205d43bb7519c8d927922f8401 (diff)
Improve detection of other stuff after certificates.
Diffstat (limited to 'src')
-rw-r--r--src/certificate.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/certificate.cc b/src/certificate.cc
index fd767fa7..7448dd59 100644
--- a/src/certificate.cc
+++ b/src/certificate.cc
@@ -142,11 +142,12 @@ Certificate::read_string (string cert)
BIO_free (bio);
+ /* See if there are any non-blank lines after the certificate that we read */
line.clear ();
- if (s.good ()) {
+ while (s.good() && line.empty()) {
getline (s, line);
}
- return !line.empty();
+ return (s.good() && !line.empty());
}
/** Destructor */