[xmlsec] replace assert with error



commit 5dec4571aa6e9fd2d4ae54e9fddf9bfa00893740
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Wed Jun 4 09:19:38 2014 -0700

    replace assert with error

 src/openssl/kt_rsa.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/openssl/kt_rsa.c b/src/openssl/kt_rsa.c
index 1cf1aba..1238ff0 100644
--- a/src/openssl/kt_rsa.c
+++ b/src/openssl/kt_rsa.c
@@ -845,8 +845,13 @@ xmlSecOpenSSLRsaOaepProcess(xmlSecTransformPtr transform, xmlSecTransformCtxPtr
         }
         outSize = ret;
     } else {
-        xmlSecAssert2("we could not be here" == NULL, -1);
-        return(-1);
+       xmlSecError(XMLSEC_ERRORS_HERE,
+                                       xmlSecErrorsSafeString(xmlSecTransformGetName(transform)),
+                                       "",
+                                       XMLSEC_ERRORS_R_XMLSEC_FAILED,
+                                       "Unexpected trasnform operation: %d; paramsSize: %d",
+                                       (int)transform->operation, (int)paramsSize);
+               return(-1);
     }
 
     ret = xmlSecBufferSetSize(out, outSize);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]