diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/certificate.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/certificate.cc b/src/certificate.cc index be043310..36aef7f9 100644 --- a/src/certificate.cc +++ b/src/certificate.cc @@ -90,8 +90,11 @@ Certificate::read_string (string cert) string line; /* BEGIN */ - getline (s, line); - boost::algorithm::trim (line); + do { + getline (s, line); + boost::algorithm::trim (line); + } while (s.good() && line != begin_certificate); + if (line != begin_certificate) { throw MiscError ("missing BEGIN line in certificate"); } |
