tolerate broken CMS/PKCS7 implementations using signature OID instead of digest
[oweals/openssl.git] / crypto / engine / eng_padlock.c
index 9519c54afbdeb9fcb3ea4d9e8a74eee1efb62944..743558ab3360515803226589cca616390f2157ed 100644 (file)
@@ -126,6 +126,9 @@ void ENGINE_load_padlock (void)
 #ifdef _MSC_VER
 # include <malloc.h>
 # define alloca _alloca
+#elif defined(NETWARE_CLIB) && defined(__GNUC__)
+  void *alloca(size_t);
+# define alloca(s) __builtin_alloca(s)
 #else
 # include <stdlib.h>
 #endif
@@ -231,8 +234,8 @@ padlock_bind_fn(ENGINE *e, const char *id)
        return 1;
 }
 
-IMPLEMENT_DYNAMIC_CHECK_FN ();
-IMPLEMENT_DYNAMIC_BIND_FN (padlock_bind_fn);
+IMPLEMENT_DYNAMIC_CHECK_FN ()
+IMPLEMENT_DYNAMIC_BIND_FN (padlock_bind_fn)
 #endif /* DYNAMIC_ENGINE */
 
 /* ===== Here comes the "real" engine ===== */
@@ -260,9 +263,9 @@ struct padlock_cipher_data
                        int dgst:1;     /* n/a in C3 */
                        int align:1;    /* n/a in C3 */
                        int ciphr:1;    /* n/a in C3 */
-                       int keygen:1;
+                       unsigned int keygen:1;
                        int interm:1;
-                       int encdec:1;
+                       unsigned int encdec:1;
                        int ksize:2;
                } b;
        } cword;                /* Control word */
@@ -436,8 +439,8 @@ static inline void *name(size_t cnt,                \
                        rep_xcrypt "\n"         \
                "       popl    %%ebx"          \
                : "=a"(iv), "=c"(cnt), "=D"(out), "=S"(inp) \
-               : "0"(cdata), "1"(cnt), "2"(out), "3"(inp) \
-               : "edx", "cc");                 \
+               : "0"(cdata), "1"(cnt), "2"(out), "3"(inp)  \
+               : "edx", "cc", "memory");       \
        return iv;                              \
 }