File openssl-fips__0080_fips_fips_c_OPENSSL_FIPS_DEBUG_FIPSCHECK_DISABLE.diff of Package compat-openssl098.703
diff -rNU 20 ../openssl-0.9.8j-o/fips/fips.c ./fips/fips.c
--- ../openssl-0.9.8j-o/fips/fips.c 2011-08-09 15:32:28.000000000 +0200
+++ ./fips/fips.c 2011-08-09 15:33:13.000000000 +0200
@@ -383,40 +383,43 @@
rv = 0;
end:
HMAC_CTX_cleanup(&c);
if (f)
fclose(f);
return rv;
}
static int
FIPSCHECK_verify(const char *libname, const char *symbolname)
{
char path[PATH_MAX+1];
int rv;
FILE *hf;
char *hmacpath, *p;
char *hmac = NULL;
size_t n;
+ if (getenv("OPENSSL_FIPS_DEBUG_FIPSCHECK_DISABLE") != NULL)
+ return 1;
+
rv = get_library_path(libname, symbolname, path, sizeof(path));
if (rv < 0)
return 0;
hmacpath = make_hmac_path(path);
hf = fopen(hmacpath, "r");
if (hf == NULL) {
free(hmacpath);
return 0;
}
if (getline(&hmac, &n, hf) > 0) {
void *buf;
size_t hmaclen;
char *hex;
if ((p=strchr(hmac, '\n')) != NULL)
*p = '\0';