diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-22 11:44:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-22 11:44:50 +0100 |
| commit | ed81e7f34255c4cde953ae6fa4148dd7edb362fa (patch) | |
| tree | fbc30f4de53ce5c790a03283e9651d2039bfb163 | |
| parent | 6f4466c962a81b205d43bb7519c8d927922f8401 (diff) | |
Improve detection of other stuff after certificates.
| -rw-r--r-- | src/certificate.cc | 5 |
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 */ |
