Recognise DEC C++ as equivalent to DEC C for the definitions of OPENSSL_EXTERN and...
[openssl.git] / crypto / rsa / rsa_sign.c
index 80a22e8abcbddb5cf2b9d136ced130961820dde2..2a440901de3ee94f76b93ffe0e843a25a50fd222 100644 (file)
@@ -77,7 +77,8 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
        const unsigned char *s = NULL;
        X509_ALGOR algor;
        ASN1_OCTET_STRING digest;
-       if(rsa->flags & RSA_FLAG_SIGN_VER)
+       if((rsa->flags & RSA_FLAG_SIGN_VER)
+             && ENGINE_get_RSA(rsa->engine)->rsa_sign)
              return ENGINE_get_RSA(rsa->engine)->rsa_sign(type,
                        m, m_len, sigret, siglen, rsa);
        /* Special case: SSL signature, just check the length */
@@ -154,7 +155,8 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
                return(0);
                }
 
-       if(rsa->flags & RSA_FLAG_SIGN_VER)
+       if((rsa->flags & RSA_FLAG_SIGN_VER)
+           && ENGINE_get_RSA(rsa->engine)->rsa_verify)
            return ENGINE_get_RSA(rsa->engine)->rsa_verify(dtype,
                        m, m_len, sigbuf, siglen, rsa);
 
@@ -198,9 +200,9 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
                                (sigtype == NID_md2WithRSAEncryption)))
                                {
                                /* ok, we will let it through */
-       #if !defined(NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
                                fprintf(stderr,"signature has problems, re-make with post SSLeay045\n");
-       #endif
+#endif
                                }
                        else
                                {