gpgsm: Fix import of some CR,LF ternminated certificates
* common/ksba-io-support.c (base64_reader_cb): Detect the END tag and don't just rely on the padding chars. This could happen only with CR+LF termnmated PEM files. Also move the detection into the invalid character detection branch for a minor parser speedup.
(cherry picked from commit 6248739799fd4a877529089375e2a4103d33e6f4)
- GnuPG-bug-id: T4847
- Signed-off-by: Werner Koch <wk@gnupg.org>