Merge pull request #216 from alex/more-error-condition

Replaced an assertion in the OpenSSL backend with a proper exception