Backport enhancements to OCSP utility from HEAD:
[openssl.git] / apps / ca.c
index 33e23910286e94a0b1c05cad0aa4848e09059303..1cf50e00294d6355b99591c0b2ce6bdfdcf42df6 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1408,6 +1408,7 @@ bad:
                        if (!NCONF_get_number(conf,section,
                                ENV_DEFAULT_CRL_HOURS, &crlhours))
                                crlhours = 0;
+                       ERR_clear_error();
                        }
                if ((crldays == 0) && (crlhours == 0) && (crlsec == 0))
                        {
@@ -2560,7 +2561,7 @@ static int get_certificate_status(const char *serial, CA_DB *db)
                        
        /* Make it Upper Case */
        for (i=0; row[DB_serial][i] != '\0'; i++)
-               row[DB_serial][i] = toupper(row[DB_serial][i]);
+               row[DB_serial][i] = toupper((unsigned char)row[DB_serial][i]);
        
 
        ok=1;