static TS_RESP *create_response(CONF *conf, const char *section, char *engine,
char *queryfile, char *passin, char *inkey,
char *signer, char *chain, const char *policy);
-static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data);
+static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data);
static ASN1_INTEGER *next_serial(const char *serialfile);
static int save_ts_serial(const char *serialfile, ASN1_INTEGER *serial);
char *ca_path, char *ca_file,
char *untrusted);
static X509_STORE *create_cert_store(char *ca_path, char *ca_file);
-static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx);
+static int verify_cb(int ok, X509_STORE_CTX *ctx);
/* Main function definition. */
int MAIN(int, char **);
{
EVP_DigestUpdate(&md_ctx, buffer, length);
}
- EVP_DigestFinal(&md_ctx, *md_value, NULL);
+ if (!EVP_DigestFinal(&md_ctx, *md_value, NULL))
+ return 0;
}
else
{
return response;
}
-static ASN1_INTEGER * MS_CALLBACK serial_cb(TS_RESP_CTX *ctx, void *data)
+static ASN1_INTEGER * serial_cb(TS_RESP_CTX *ctx, void *data)
{
const char *serial_file = (const char *) data;
ASN1_INTEGER *serial = next_serial(serial_file);
return NULL;
}
-static int MS_CALLBACK verify_cb(int ok, X509_STORE_CTX *ctx)
+static int verify_cb(int ok, X509_STORE_CTX *ctx)
{
- /*
+ /*-
char buf[256];
if (!ok)