[xmlsec] and another attempt to fix bug 728213: better detect private keys on ext RSA engines



commit 07172bd459c329ad6a41fbe9a34a6b64d1d2f32b
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Thu May 22 13:51:39 2014 -0700

    and another attempt to fix bug 728213: better detect private keys on ext RSA engines

 src/openssl/evp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/openssl/evp.c b/src/openssl/evp.c
index 9cb52dc..e042f26 100644
--- a/src/openssl/evp.c
+++ b/src/openssl/evp.c
@@ -1798,7 +1798,7 @@ xmlSecOpenSSLKeyDataRsaGetType(xmlSecKeyDataPtr data) {
     if((rsa != NULL) && (rsa->n != NULL) && (rsa->e != NULL)) {
         if(rsa->d != NULL) {
             return(xmlSecKeyDataTypePrivate | xmlSecKeyDataTypePublic);
-        } else if(rsa->engine != NULL) {
+        } else if((rsa->flags & RSA_FLAG_EXT_PKEY) != 0) {
             /*
              * !!! HACK !!! Also see DSA key
              * We assume here that engine *always* has private key.


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