diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-08-24 23:38:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-08-24 23:38:15 +0000 |
commit | 38b7a35a37dd4e4b293a9c4cef518fd035819a1c (patch) | |
tree | eae65227b8e69e0059cdc685c4a6946582246dd3 | |
parent | 3c6c221510765f444d0c35de5b370b905f3e2928 (diff) | |
download | libmicrohttpd-38b7a35a37dd4e4b293a9c4cef518fd035819a1c.tar.gz libmicrohttpd-38b7a35a37dd4e4b293a9c4cef518fd035819a1c.zip |
simplify
-rw-r--r-- | src/daemon/https/x509/pkcs12.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/daemon/https/x509/pkcs12.c b/src/daemon/https/x509/pkcs12.c index 3d1705ab..282e006e 100644 --- a/src/daemon/https/x509/pkcs12.c +++ b/src/daemon/https/x509/pkcs12.c | |||
@@ -858,7 +858,6 @@ gnutls_pkcs12_generate_mac (gnutls_pkcs12_t pkcs12, const char *pass) | |||
858 | { | 858 | { |
859 | opaque salt[8], key[20]; | 859 | opaque salt[8], key[20]; |
860 | int result; | 860 | int result; |
861 | const int iter = 1; | ||
862 | mac_hd_t td1 = NULL; | 861 | mac_hd_t td1 = NULL; |
863 | gnutls_datum_t tmp = { NULL, 0 }; | 862 | gnutls_datum_t tmp = { NULL, 0 }; |
864 | opaque sha_mac[20]; | 863 | opaque sha_mac[20]; |
@@ -888,25 +887,10 @@ gnutls_pkcs12_generate_mac (gnutls_pkcs12_t pkcs12, const char *pass) | |||
888 | goto cleanup; | 887 | goto cleanup; |
889 | } | 888 | } |
890 | 889 | ||
891 | /* write the iterations | ||
892 | */ | ||
893 | |||
894 | if (iter > 1) | ||
895 | { | ||
896 | result = | ||
897 | _gnutls_x509_write_uint32 (pkcs12->pkcs12, "macData.iterations", | ||
898 | iter); | ||
899 | if (result < 0) | ||
900 | { | ||
901 | gnutls_assert (); | ||
902 | goto cleanup; | ||
903 | } | ||
904 | } | ||
905 | |||
906 | /* Generate the key. | 890 | /* Generate the key. |
907 | */ | 891 | */ |
908 | result = _pkcs12_string_to_key (3 /*MAC*/, salt, sizeof (salt), | 892 | result = _pkcs12_string_to_key (3 /*MAC*/, salt, sizeof (salt), |
909 | iter, pass, sizeof (key), key); | 893 | 1, pass, sizeof (key), key); |
910 | if (result < 0) | 894 | if (result < 0) |
911 | { | 895 | { |
912 | gnutls_assert (); | 896 | gnutls_assert (); |