Fix error conditions in certificate/PKCS#7 reading

When an error condition is encountered in BoringSSL, sometimes it
deliberately does not put something on the ERR stack to prevent abuse of
that knowledge. Instead we need to throw an exception explicitly when no
error is pushed onto the stack.

(cherry picked from commit 79f05f46c8fb2f19c8d11564ef93ef332f79fdc9)

Bug: 21034231
Change-Id: Ia06347c5653672c982ecff2c26be9b091d03009f
1 file changed