summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-09-18 14:56:39 +0200
committerWerner Koch <wk@gnupg.org>2014-09-18 14:56:39 +0200
commit327134934d79d141d92170ad3b4a6ef3cb718ee0 (patch)
tree9b0a8775ad75c1797455962691913693b95494c4
parentgpg: Re-indent a function. (diff)
downloadgnupg2-327134934d79d141d92170ad3b4a6ef3cb718ee0.tar.xz
gnupg2-327134934d79d141d92170ad3b4a6ef3cb718ee0.zip
gpg: Replace a hash algo test function.
* g10/gpg.c (print_mds): Replace openpgp_md_test_algo. -- This is actually not required because as of now the used OpenPGP and Gcrypt hash algorithm numbers are identical. But that might change in the future. This changes the behavior of GnuPG in case it has been build with some algorithms disabled: If those algorithms are available in Libgcrypt, their results will be used printed anyway.
-rw-r--r--g10/gpg.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index b06e392f7..a9d248dec 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4386,18 +4386,18 @@ print_mds( const char *fname, int algo )
gcry_md_enable (md, algo);
else
{
- if (!openpgp_md_test_algo (GCRY_MD_MD5))
+ if (!gcry_md_test_algo (GCRY_MD_MD5))
gcry_md_enable (md, GCRY_MD_MD5);
gcry_md_enable (md, GCRY_MD_SHA1);
- if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+ if (!gcry_md_test_algo (GCRY_MD_RMD160))
gcry_md_enable (md, GCRY_MD_RMD160);
- if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+ if (!gcry_md_test_algo (GCRY_MD_SHA224))
gcry_md_enable (md, GCRY_MD_SHA224);
- if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+ if (!gcry_md_test_algo (GCRY_MD_SHA256))
gcry_md_enable (md, GCRY_MD_SHA256);
- if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+ if (!gcry_md_test_algo (GCRY_MD_SHA384))
gcry_md_enable (md, GCRY_MD_SHA384);
- if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+ if (!gcry_md_test_algo (GCRY_MD_SHA512))
gcry_md_enable (md, GCRY_MD_SHA512);
}
@@ -4415,18 +4415,18 @@ print_mds( const char *fname, int algo )
print_hashline (md, algo, fname);
else
{
- if (!openpgp_md_test_algo (GCRY_MD_MD5))
+ if (!gcry_md_test_algo (GCRY_MD_MD5))
print_hashline( md, GCRY_MD_MD5, fname );
print_hashline( md, GCRY_MD_SHA1, fname );
- if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+ if (!gcry_md_test_algo (GCRY_MD_RMD160))
print_hashline( md, GCRY_MD_RMD160, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+ if (!gcry_md_test_algo (GCRY_MD_SHA224))
print_hashline (md, GCRY_MD_SHA224, fname);
- if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+ if (!gcry_md_test_algo (GCRY_MD_SHA256))
print_hashline( md, GCRY_MD_SHA256, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+ if (!gcry_md_test_algo (GCRY_MD_SHA384))
print_hashline ( md, GCRY_MD_SHA384, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+ if (!gcry_md_test_algo (GCRY_MD_SHA512))
print_hashline ( md, GCRY_MD_SHA512, fname );
}
}
@@ -4436,18 +4436,18 @@ print_mds( const char *fname, int algo )
print_hex (md, -algo, fname);
else
{
- if (!openpgp_md_test_algo (GCRY_MD_MD5))
+ if (!gcry_md_test_algo (GCRY_MD_MD5))
print_hex (md, GCRY_MD_MD5, fname);
print_hex (md, GCRY_MD_SHA1, fname );
- if (!openpgp_md_test_algo (GCRY_MD_RMD160))
+ if (!gcry_md_test_algo (GCRY_MD_RMD160))
print_hex (md, GCRY_MD_RMD160, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA224))
+ if (!gcry_md_test_algo (GCRY_MD_SHA224))
print_hex (md, GCRY_MD_SHA224, fname);
- if (!openpgp_md_test_algo (GCRY_MD_SHA256))
+ if (!gcry_md_test_algo (GCRY_MD_SHA256))
print_hex (md, GCRY_MD_SHA256, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA384))
+ if (!gcry_md_test_algo (GCRY_MD_SHA384))
print_hex (md, GCRY_MD_SHA384, fname );
- if (!openpgp_md_test_algo (GCRY_MD_SHA512))
+ if (!gcry_md_test_algo (GCRY_MD_SHA512))
print_hex (md, GCRY_MD_SHA512, fname );
}
}