diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-12-11 14:48:37 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-12-11 14:48:37 +0000 |
| commit | b9e663597463ecfe74ac0a67263425264ea49931 (patch) | |
| tree | ce3abb3ab9615cde48b54541c44801572ffb70fe /src/certificate.cc | |
| parent | 3afe04f24a99c95798718cc7dc992c4e636be508 (diff) | |
Allow certificates with preamble before BEGIN CERTIFICATE (dcpomatic #774).
Diffstat (limited to 'src/certificate.cc')
| -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"); } |
