Remove asserts (#904)

diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py
index e2956ae..30dd478 100644
--- a/src/OpenSSL/crypto.py
+++ b/src/OpenSSL/crypto.py
@@ -1819,7 +1819,7 @@
             "type argument must be FILETYPE_PEM, FILETYPE_ASN1, or "
             "FILETYPE_TEXT")
 
-    assert result_code == 1
+    _openssl_assert(result_code == 1)
     return _bio_to_string(bio)
 
 
@@ -2893,7 +2893,7 @@
             "type argument must be FILETYPE_PEM, FILETYPE_ASN1, or "
             "FILETYPE_TEXT")
 
-    assert ret == 1
+    _openssl_assert(ret == 1)
     return _bio_to_string(bio)