diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-08-24 17:53:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-08-24 17:53:48 +0000 |
commit | 46622f6b02b8ac3138cd2ef57fc8b1a5e7d893fd (patch) | |
tree | 1212af95cfd01578229f9ae3a4b259dcdee2da0b /src/daemon/https/x509 | |
parent | bb5fc0ba651bafc59a429853eb965518d436d82a (diff) | |
download | libmicrohttpd-46622f6b02b8ac3138cd2ef57fc8b1a5e7d893fd.tar.gz libmicrohttpd-46622f6b02b8ac3138cd2ef57fc8b1a5e7d893fd.zip |
renaming enums to have MHD_ prefix always, removing a few redundant values
Diffstat (limited to 'src/daemon/https/x509')
-rw-r--r-- | src/daemon/https/x509/common.c | 2 | ||||
-rw-r--r-- | src/daemon/https/x509/common.h | 2 | ||||
-rw-r--r-- | src/daemon/https/x509/crl_write.c | 4 | ||||
-rw-r--r-- | src/daemon/https/x509/crq.c | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/mpi.c | 4 | ||||
-rw-r--r-- | src/daemon/https/x509/mpi.h | 4 | ||||
-rw-r--r-- | src/daemon/https/x509/privkey_pkcs8.c | 4 | ||||
-rw-r--r-- | src/daemon/https/x509/sign.c | 12 | ||||
-rw-r--r-- | src/daemon/https/x509/sign.h | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/x509.c | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/x509.h | 16 | ||||
-rw-r--r-- | src/daemon/https/x509/x509_privkey.c | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/x509_verify.c | 6 | ||||
-rw-r--r-- | src/daemon/https/x509/x509_write.c | 4 |
14 files changed, 41 insertions, 41 deletions
diff --git a/src/daemon/https/x509/common.c b/src/daemon/https/x509/common.c index f3dde1d1..e8c21fe9 100644 --- a/src/daemon/https/x509/common.c +++ b/src/daemon/https/x509/common.c | |||
@@ -1215,7 +1215,7 @@ cleanup:if (val.data != data->data) | |||
1215 | int | 1215 | int |
1216 | _gnutls_x509_encode_and_copy_PKI_params (ASN1_TYPE dst, | 1216 | _gnutls_x509_encode_and_copy_PKI_params (ASN1_TYPE dst, |
1217 | const char *dst_name, | 1217 | const char *dst_name, |
1218 | gnutls_pk_algorithm_t | 1218 | enum MHD_GNUTLS_PublicKeyAlgorithm |
1219 | pk_algorithm, | 1219 | pk_algorithm, |
1220 | mpi_t * params, int params_size) | 1220 | mpi_t * params, int params_size) |
1221 | { | 1221 | { |
diff --git a/src/daemon/https/x509/common.h b/src/daemon/https/x509/common.h index 0b696810..01b1bf30 100644 --- a/src/daemon/https/x509/common.h +++ b/src/daemon/https/x509/common.h | |||
@@ -112,7 +112,7 @@ int _gnutls_x509_get_pk_algorithm (ASN1_TYPE src, const char *src_name, | |||
112 | 112 | ||
113 | int _gnutls_x509_encode_and_copy_PKI_params (ASN1_TYPE dst, | 113 | int _gnutls_x509_encode_and_copy_PKI_params (ASN1_TYPE dst, |
114 | const char *dst_name, | 114 | const char *dst_name, |
115 | gnutls_pk_algorithm_t | 115 | enum MHD_GNUTLS_PublicKeyAlgorithm |
116 | pk_algorithm, mpi_t * params, | 116 | pk_algorithm, mpi_t * params, |
117 | int params_size); | 117 | int params_size); |
118 | int _gnutls_asn1_copy_node (ASN1_TYPE * dst, const char *dst_name, | 118 | int _gnutls_asn1_copy_node (ASN1_TYPE * dst, const char *dst_name, |
diff --git a/src/daemon/https/x509/crl_write.c b/src/daemon/https/x509/crl_write.c index 7f4e246a..7b651695 100644 --- a/src/daemon/https/x509/crl_write.c +++ b/src/daemon/https/x509/crl_write.c | |||
@@ -102,7 +102,7 @@ gnutls_x509_crl_set_version (gnutls_x509_crl_t crl, unsigned int version) | |||
102 | int | 102 | int |
103 | gnutls_x509_crl_sign2 (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, | 103 | gnutls_x509_crl_sign2 (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, |
104 | gnutls_x509_privkey_t issuer_key, | 104 | gnutls_x509_privkey_t issuer_key, |
105 | gnutls_digest_algorithm_t dig, unsigned int flags) | 105 | enum MHD_GNUTLS_HashAlgorithm dig, unsigned int flags) |
106 | { | 106 | { |
107 | int result; | 107 | int result; |
108 | 108 | ||
@@ -143,7 +143,7 @@ int | |||
143 | gnutls_x509_crl_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, | 143 | gnutls_x509_crl_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, |
144 | gnutls_x509_privkey_t issuer_key) | 144 | gnutls_x509_privkey_t issuer_key) |
145 | { | 145 | { |
146 | return gnutls_x509_crl_sign2 (crl, issuer, issuer_key, MHD_GNUTLS_DIG_SHA1, | 146 | return gnutls_x509_crl_sign2 (crl, issuer, issuer_key, MHD_GNUTLS_MAC_SHA1, |
147 | 0); | 147 | 0); |
148 | } | 148 | } |
149 | 149 | ||
diff --git a/src/daemon/https/x509/crq.c b/src/daemon/https/x509/crq.c index 5efbd5cc..3868a455 100644 --- a/src/daemon/https/x509/crq.c +++ b/src/daemon/https/x509/crq.c | |||
@@ -740,7 +740,7 @@ gnutls_x509_crq_set_challenge_password (gnutls_x509_crq_t crq, | |||
740 | **/ | 740 | **/ |
741 | int | 741 | int |
742 | gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, | 742 | gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, |
743 | gnutls_digest_algorithm_t dig, unsigned int flags) | 743 | enum MHD_GNUTLS_HashAlgorithm dig, unsigned int flags) |
744 | { | 744 | { |
745 | int result; | 745 | int result; |
746 | gnutls_datum_t signature; | 746 | gnutls_datum_t signature; |
@@ -805,7 +805,7 @@ gnutls_x509_crq_sign2 (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key, | |||
805 | int | 805 | int |
806 | gnutls_x509_crq_sign (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key) | 806 | gnutls_x509_crq_sign (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key) |
807 | { | 807 | { |
808 | return gnutls_x509_crq_sign2 (crq, key, MHD_GNUTLS_DIG_SHA1, 0); | 808 | return gnutls_x509_crq_sign2 (crq, key, MHD_GNUTLS_MAC_SHA1, 0); |
809 | } | 809 | } |
810 | 810 | ||
811 | /** | 811 | /** |
@@ -857,7 +857,7 @@ gnutls_x509_crq_export (gnutls_x509_crq_t crq, | |||
857 | * For DSA the bits returned are of the public | 857 | * For DSA the bits returned are of the public |
858 | * exponent. | 858 | * exponent. |
859 | * | 859 | * |
860 | * Returns a member of the gnutls_pk_algorithm_t enumeration on success, | 860 | * Returns a member of the enum MHD_GNUTLS_PublicKeyAlgorithm enumeration on success, |
861 | * or a negative value on error. | 861 | * or a negative value on error. |
862 | * | 862 | * |
863 | **/ | 863 | **/ |
diff --git a/src/daemon/https/x509/mpi.c b/src/daemon/https/x509/mpi.c index da19c76e..73f091c1 100644 --- a/src/daemon/https/x509/mpi.c +++ b/src/daemon/https/x509/mpi.c | |||
@@ -335,8 +335,8 @@ cleanup:asn1_delete_structure (&spk); | |||
335 | int | 335 | int |
336 | _gnutls_x509_write_sig_params (ASN1_TYPE dst, | 336 | _gnutls_x509_write_sig_params (ASN1_TYPE dst, |
337 | const char *dst_name, | 337 | const char *dst_name, |
338 | gnutls_pk_algorithm_t pk_algorithm, | 338 | enum MHD_GNUTLS_PublicKeyAlgorithm pk_algorithm, |
339 | gnutls_digest_algorithm_t dig, | 339 | enum MHD_GNUTLS_HashAlgorithm dig, |
340 | mpi_t * params, int params_size) | 340 | mpi_t * params, int params_size) |
341 | { | 341 | { |
342 | int result; | 342 | int result; |
diff --git a/src/daemon/https/x509/mpi.h b/src/daemon/https/x509/mpi.h index 785d7e02..30f8fd77 100644 --- a/src/daemon/https/x509/mpi.h +++ b/src/daemon/https/x509/mpi.h | |||
@@ -52,6 +52,6 @@ int _gnutls_x509_write_uint32 (ASN1_TYPE node, const char *value, | |||
52 | uint32_t num); | 52 | uint32_t num); |
53 | 53 | ||
54 | int _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char *dst_name, | 54 | int _gnutls_x509_write_sig_params (ASN1_TYPE dst, const char *dst_name, |
55 | gnutls_pk_algorithm_t pk_algorithm, | 55 | enum MHD_GNUTLS_PublicKeyAlgorithm pk_algorithm, |
56 | gnutls_digest_algorithm_t, mpi_t * params, | 56 | enum MHD_GNUTLS_HashAlgorithm, mpi_t * params, |
57 | int params_size); | 57 | int params_size); |
diff --git a/src/daemon/https/x509/privkey_pkcs8.c b/src/daemon/https/x509/privkey_pkcs8.c index 587fe7db..fa5b5c43 100644 --- a/src/daemon/https/x509/privkey_pkcs8.c +++ b/src/daemon/https/x509/privkey_pkcs8.c | |||
@@ -63,7 +63,7 @@ struct pbkdf2_params | |||
63 | 63 | ||
64 | struct pbe_enc_params | 64 | struct pbe_enc_params |
65 | { | 65 | { |
66 | gnutls_cipher_algorithm_t cipher; | 66 | enum MHD_GNUTLS_CipherAlgorithm cipher; |
67 | opaque iv[8]; | 67 | opaque iv[8]; |
68 | int iv_size; | 68 | int iv_size; |
69 | }; | 69 | }; |
@@ -1284,7 +1284,7 @@ error: | |||
1284 | /* Converts an OID to a gnutls cipher type. | 1284 | /* Converts an OID to a gnutls cipher type. |
1285 | */ | 1285 | */ |
1286 | inline static int | 1286 | inline static int |
1287 | oid2cipher (const char *oid, gnutls_cipher_algorithm_t * algo) | 1287 | oid2cipher (const char *oid, enum MHD_GNUTLS_CipherAlgorithm * algo) |
1288 | { | 1288 | { |
1289 | 1289 | ||
1290 | *algo = 0; | 1290 | *algo = 0; |
diff --git a/src/daemon/https/x509/sign.c b/src/daemon/https/x509/sign.c index 672c2af6..9a548665 100644 --- a/src/daemon/https/x509/sign.c +++ b/src/daemon/https/x509/sign.c | |||
@@ -49,14 +49,14 @@ | |||
49 | * structure. The digest info is allocated and stored into the info structure. | 49 | * structure. The digest info is allocated and stored into the info structure. |
50 | */ | 50 | */ |
51 | static int | 51 | static int |
52 | encode_ber_digest_info (gnutls_digest_algorithm_t hash, | 52 | encode_ber_digest_info (enum MHD_GNUTLS_HashAlgorithm hash, |
53 | const gnutls_datum_t * digest, gnutls_datum_t * info) | 53 | const gnutls_datum_t * digest, gnutls_datum_t * info) |
54 | { | 54 | { |
55 | ASN1_TYPE dinfo = ASN1_TYPE_EMPTY; | 55 | ASN1_TYPE dinfo = ASN1_TYPE_EMPTY; |
56 | int result; | 56 | int result; |
57 | const char *algo; | 57 | const char *algo; |
58 | 58 | ||
59 | algo = mhd_gtls_x509_mac_to_oid ((gnutls_mac_algorithm_t) hash); | 59 | algo = mhd_gtls_x509_mac_to_oid ((enum MHD_GNUTLS_HashAlgorithm) hash); |
60 | if (algo == NULL) | 60 | if (algo == NULL) |
61 | { | 61 | { |
62 | gnutls_assert (); | 62 | gnutls_assert (); |
@@ -132,7 +132,7 @@ encode_ber_digest_info (gnutls_digest_algorithm_t hash, | |||
132 | * params[1] is public key | 132 | * params[1] is public key |
133 | */ | 133 | */ |
134 | static int | 134 | static int |
135 | pkcs1_rsa_sign (gnutls_digest_algorithm_t hash, const gnutls_datum_t * text, | 135 | pkcs1_rsa_sign (enum MHD_GNUTLS_HashAlgorithm hash, const gnutls_datum_t * text, |
136 | mpi_t * params, int params_len, gnutls_datum_t * signature) | 136 | mpi_t * params, int params_len, gnutls_datum_t * signature) |
137 | { | 137 | { |
138 | int ret; | 138 | int ret; |
@@ -186,7 +186,7 @@ pkcs1_rsa_sign (gnutls_digest_algorithm_t hash, const gnutls_datum_t * text, | |||
186 | */ | 186 | */ |
187 | int | 187 | int |
188 | _gnutls_x509_sign (const gnutls_datum_t * tbs, | 188 | _gnutls_x509_sign (const gnutls_datum_t * tbs, |
189 | gnutls_digest_algorithm_t hash, | 189 | enum MHD_GNUTLS_HashAlgorithm hash, |
190 | gnutls_x509_privkey_t signer, gnutls_datum_t * signature) | 190 | gnutls_x509_privkey_t signer, gnutls_datum_t * signature) |
191 | { | 191 | { |
192 | int ret; | 192 | int ret; |
@@ -217,7 +217,7 @@ _gnutls_x509_sign (const gnutls_datum_t * tbs, | |||
217 | */ | 217 | */ |
218 | int | 218 | int |
219 | _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name, | 219 | _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name, |
220 | gnutls_digest_algorithm_t hash, | 220 | enum MHD_GNUTLS_HashAlgorithm hash, |
221 | gnutls_x509_privkey_t signer, | 221 | gnutls_x509_privkey_t signer, |
222 | gnutls_datum_t * signature) | 222 | gnutls_datum_t * signature) |
223 | { | 223 | { |
@@ -268,7 +268,7 @@ _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name, | |||
268 | -*/ | 268 | -*/ |
269 | int | 269 | int |
270 | _gnutls_x509_pkix_sign (ASN1_TYPE src, const char *src_name, | 270 | _gnutls_x509_pkix_sign (ASN1_TYPE src, const char *src_name, |
271 | gnutls_digest_algorithm_t dig, | 271 | enum MHD_GNUTLS_HashAlgorithm dig, |
272 | gnutls_x509_crt_t issuer, | 272 | gnutls_x509_crt_t issuer, |
273 | gnutls_x509_privkey_t issuer_key) | 273 | gnutls_x509_privkey_t issuer_key) |
274 | { | 274 | { |
diff --git a/src/daemon/https/x509/sign.h b/src/daemon/https/x509/sign.h index e1bf46d4..c7da9e2e 100644 --- a/src/daemon/https/x509/sign.h +++ b/src/daemon/https/x509/sign.h | |||
@@ -23,14 +23,14 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | int _gnutls_x509_sign (const gnutls_datum_t * tbs, | 25 | int _gnutls_x509_sign (const gnutls_datum_t * tbs, |
26 | gnutls_digest_algorithm_t hash, | 26 | enum MHD_GNUTLS_HashAlgorithm hash, |
27 | gnutls_x509_privkey_t signer, | 27 | gnutls_x509_privkey_t signer, |
28 | gnutls_datum_t * signature); | 28 | gnutls_datum_t * signature); |
29 | int _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name, | 29 | int _gnutls_x509_sign_tbs (ASN1_TYPE cert, const char *tbs_name, |
30 | gnutls_digest_algorithm_t hash, | 30 | enum MHD_GNUTLS_HashAlgorithm hash, |
31 | gnutls_x509_privkey_t signer, | 31 | gnutls_x509_privkey_t signer, |
32 | gnutls_datum_t * signature); | 32 | gnutls_datum_t * signature); |
33 | int _gnutls_x509_pkix_sign (ASN1_TYPE src, const char *src_name, | 33 | int _gnutls_x509_pkix_sign (ASN1_TYPE src, const char *src_name, |
34 | gnutls_digest_algorithm_t, | 34 | enum MHD_GNUTLS_HashAlgorithm, |
35 | gnutls_x509_crt_t issuer, | 35 | gnutls_x509_crt_t issuer, |
36 | gnutls_x509_privkey_t issuer_key); | 36 | gnutls_x509_privkey_t issuer_key); |
diff --git a/src/daemon/https/x509/x509.c b/src/daemon/https/x509/x509.c index c682abe0..e8dff3c7 100644 --- a/src/daemon/https/x509/x509.c +++ b/src/daemon/https/x509/x509.c | |||
@@ -858,7 +858,7 @@ gnutls_x509_crt_get_authority_key_id (gnutls_x509_crt_t cert, | |||
858 | * For DSA the bits returned are of the public | 858 | * For DSA the bits returned are of the public |
859 | * exponent. | 859 | * exponent. |
860 | * | 860 | * |
861 | * Returns a member of the gnutls_pk_algorithm_t enumeration on success, | 861 | * Returns a member of the enum MHD_GNUTLS_PublicKeyAlgorithm enumeration on success, |
862 | * or a negative value on error. | 862 | * or a negative value on error. |
863 | * | 863 | * |
864 | **/ | 864 | **/ |
@@ -1945,7 +1945,7 @@ gnutls_x509_dn_get_rdn_ava (gnutls_x509_dn_t dn, | |||
1945 | **/ | 1945 | **/ |
1946 | int | 1946 | int |
1947 | gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert, | 1947 | gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert, |
1948 | gnutls_digest_algorithm_t algo, | 1948 | enum MHD_GNUTLS_HashAlgorithm algo, |
1949 | void *buf, size_t * sizeof_buf) | 1949 | void *buf, size_t * sizeof_buf) |
1950 | { | 1950 | { |
1951 | opaque *cert_buf; | 1951 | opaque *cert_buf; |
@@ -2165,7 +2165,7 @@ gnutls_x509_crt_get_key_id (gnutls_x509_crt_t crt, | |||
2165 | return mhd_gtls_asn2err (result); | 2165 | return mhd_gtls_asn2err (result); |
2166 | } | 2166 | } |
2167 | 2167 | ||
2168 | result = MHD_gnutls_fingerprint (MHD_GNUTLS_DIG_SHA1, &pubkey, output_data, | 2168 | result = MHD_gnutls_fingerprint (MHD_GNUTLS_MAC_SHA1, &pubkey, output_data, |
2169 | output_data_size); | 2169 | output_data_size); |
2170 | 2170 | ||
2171 | gnutls_afree (pubkey.data); | 2171 | gnutls_afree (pubkey.data); |
diff --git a/src/daemon/https/x509/x509.h b/src/daemon/https/x509/x509.h index b333b5d0..f779759f 100644 --- a/src/daemon/https/x509/x509.h +++ b/src/daemon/https/x509/x509.h | |||
@@ -296,7 +296,7 @@ int gnutls_x509_crt_sign(gnutls_x509_crt_t crt, | |||
296 | int gnutls_x509_crt_sign2(gnutls_x509_crt_t crt, | 296 | int gnutls_x509_crt_sign2(gnutls_x509_crt_t crt, |
297 | gnutls_x509_crt_t issuer, | 297 | gnutls_x509_crt_t issuer, |
298 | gnutls_x509_privkey_t issuer_key, | 298 | gnutls_x509_privkey_t issuer_key, |
299 | gnutls_digest_algorithm_t, | 299 | enum MHD_GNUTLS_HashAlgorithm, |
300 | unsigned int flags); | 300 | unsigned int flags); |
301 | int gnutls_x509_crt_set_activation_time(gnutls_x509_crt_t cert, | 301 | int gnutls_x509_crt_set_activation_time(gnutls_x509_crt_t cert, |
302 | time_t act_time); | 302 | time_t act_time); |
@@ -435,7 +435,7 @@ int gnutls_x509_crl_sign(gnutls_x509_crl_t crl, | |||
435 | int gnutls_x509_crl_sign2(gnutls_x509_crl_t crl, | 435 | int gnutls_x509_crl_sign2(gnutls_x509_crl_t crl, |
436 | gnutls_x509_crt_t issuer, | 436 | gnutls_x509_crt_t issuer, |
437 | gnutls_x509_privkey_t issuer_key, | 437 | gnutls_x509_privkey_t issuer_key, |
438 | gnutls_digest_algorithm_t, | 438 | enum MHD_GNUTLS_HashAlgorithm, |
439 | unsigned int flags); | 439 | unsigned int flags); |
440 | int gnutls_x509_crl_set_this_update(gnutls_x509_crl_t crl, | 440 | int gnutls_x509_crl_set_this_update(gnutls_x509_crl_t crl, |
441 | time_t act_time); | 441 | time_t act_time); |
@@ -556,7 +556,7 @@ int gnutls_x509_crt_check_revocation(gnutls_x509_crt_t cert, | |||
556 | int crl_list_length); | 556 | int crl_list_length); |
557 | 557 | ||
558 | int gnutls_x509_crt_get_fingerprint(gnutls_x509_crt_t cert, | 558 | int gnutls_x509_crt_get_fingerprint(gnutls_x509_crt_t cert, |
559 | gnutls_digest_algorithm_t algo, | 559 | enum MHD_GNUTLS_HashAlgorithm algo, |
560 | void *buf, | 560 | void *buf, |
561 | size_t * sizeof_buf); | 561 | size_t * sizeof_buf); |
562 | 562 | ||
@@ -631,7 +631,7 @@ int gnutls_x509_privkey_get_key_id(gnutls_x509_privkey_t key, | |||
631 | size_t * output_data_size); | 631 | size_t * output_data_size); |
632 | 632 | ||
633 | int gnutls_x509_privkey_generate(gnutls_x509_privkey_t key, | 633 | int gnutls_x509_privkey_generate(gnutls_x509_privkey_t key, |
634 | gnutls_pk_algorithm_t algo, | 634 | enum MHD_GNUTLS_PublicKeyAlgorithm algo, |
635 | unsigned int bits, | 635 | unsigned int bits, |
636 | unsigned int flags); | 636 | unsigned int flags); |
637 | 637 | ||
@@ -656,7 +656,7 @@ int gnutls_x509_privkey_export_rsa_raw(gnutls_x509_privkey_t key, | |||
656 | /* Signing stuff. | 656 | /* Signing stuff. |
657 | */ | 657 | */ |
658 | int gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t key, | 658 | int gnutls_x509_privkey_sign_data(gnutls_x509_privkey_t key, |
659 | gnutls_digest_algorithm_t digest, | 659 | enum MHD_GNUTLS_HashAlgorithm digest, |
660 | unsigned int flags, | 660 | unsigned int flags, |
661 | const gnutls_datum_t * data, | 661 | const gnutls_datum_t * data, |
662 | void *signature, | 662 | void *signature, |
@@ -710,7 +710,7 @@ int gnutls_x509_crq_set_key(gnutls_x509_crq_t crq, | |||
710 | gnutls_x509_privkey_t key); | 710 | gnutls_x509_privkey_t key); |
711 | int gnutls_x509_crq_sign2(gnutls_x509_crq_t crq, | 711 | int gnutls_x509_crq_sign2(gnutls_x509_crq_t crq, |
712 | gnutls_x509_privkey_t key, | 712 | gnutls_x509_privkey_t key, |
713 | gnutls_digest_algorithm_t, | 713 | enum MHD_GNUTLS_HashAlgorithm, |
714 | unsigned int flags); | 714 | unsigned int flags); |
715 | int gnutls_x509_crq_sign(gnutls_x509_crq_t crq, | 715 | int gnutls_x509_crq_sign(gnutls_x509_crq_t crq, |
716 | gnutls_x509_privkey_t key); | 716 | gnutls_x509_privkey_t key); |
@@ -800,7 +800,7 @@ typedef struct MHD_gtls_x509_privkey_int | |||
800 | */ | 800 | */ |
801 | int params_size; /* holds the number of params */ | 801 | int params_size; /* holds the number of params */ |
802 | 802 | ||
803 | gnutls_pk_algorithm_t pk_algorithm; | 803 | enum MHD_GNUTLS_PublicKeyAlgorithm pk_algorithm; |
804 | 804 | ||
805 | int crippled; /* The crippled keys will not use the ASN1_TYPE key. | 805 | int crippled; /* The crippled keys will not use the ASN1_TYPE key. |
806 | * The encoding will only be performed at the export | 806 | * The encoding will only be performed at the export |
@@ -887,7 +887,7 @@ int gnutls_x509_privkey_init(gnutls_x509_privkey_t * key); | |||
887 | void gnutls_x509_privkey_deinit(gnutls_x509_privkey_t key); | 887 | void gnutls_x509_privkey_deinit(gnutls_x509_privkey_t key); |
888 | 888 | ||
889 | int gnutls_x509_privkey_generate(gnutls_x509_privkey_t key, | 889 | int gnutls_x509_privkey_generate(gnutls_x509_privkey_t key, |
890 | gnutls_pk_algorithm_t algo, | 890 | enum MHD_GNUTLS_PublicKeyAlgorithm algo, |
891 | unsigned int bits, | 891 | unsigned int bits, |
892 | unsigned int flags); | 892 | unsigned int flags); |
893 | 893 | ||
diff --git a/src/daemon/https/x509/x509_privkey.c b/src/daemon/https/x509/x509_privkey.c index 2eade5d1..5e58cffb 100644 --- a/src/daemon/https/x509/x509_privkey.c +++ b/src/daemon/https/x509/x509_privkey.c | |||
@@ -552,7 +552,7 @@ gnutls_x509_privkey_import_rsa_raw (gnutls_x509_privkey_t key, | |||
552 | * This function will return the public key algorithm of a private | 552 | * This function will return the public key algorithm of a private |
553 | * key. | 553 | * key. |
554 | * | 554 | * |
555 | * Returns a member of the gnutls_pk_algorithm_t enumeration on success, | 555 | * Returns a member of the enum MHD_GNUTLS_PublicKeyAlgorithm enumeration on success, |
556 | * or a negative value on error. | 556 | * or a negative value on error. |
557 | * | 557 | * |
558 | **/ | 558 | **/ |
@@ -1190,7 +1190,7 @@ cleanup:asn1_delete_structure (c2); | |||
1190 | **/ | 1190 | **/ |
1191 | int | 1191 | int |
1192 | gnutls_x509_privkey_generate (gnutls_x509_privkey_t key, | 1192 | gnutls_x509_privkey_generate (gnutls_x509_privkey_t key, |
1193 | gnutls_pk_algorithm_t algo, | 1193 | enum MHD_GNUTLS_PublicKeyAlgorithm algo, |
1194 | unsigned int bits, unsigned int flags) | 1194 | unsigned int bits, unsigned int flags) |
1195 | { | 1195 | { |
1196 | int ret, params_len; | 1196 | int ret, params_len; |
@@ -1348,7 +1348,7 @@ cleanup: | |||
1348 | **/ | 1348 | **/ |
1349 | int | 1349 | int |
1350 | gnutls_x509_privkey_sign_data (gnutls_x509_privkey_t key, | 1350 | gnutls_x509_privkey_sign_data (gnutls_x509_privkey_t key, |
1351 | gnutls_digest_algorithm_t digest, | 1351 | enum MHD_GNUTLS_HashAlgorithm digest, |
1352 | unsigned int flags, | 1352 | unsigned int flags, |
1353 | const gnutls_datum_t * data, | 1353 | const gnutls_datum_t * data, |
1354 | void *signature, size_t * signature_size) | 1354 | void *signature, size_t * signature_size) |
diff --git a/src/daemon/https/x509/x509_verify.c b/src/daemon/https/x509/x509_verify.c index 3a27bfec..646bdf10 100644 --- a/src/daemon/https/x509/x509_verify.c +++ b/src/daemon/https/x509/x509_verify.c | |||
@@ -465,7 +465,7 @@ _gnutls_x509_verify_certificate (const gnutls_x509_crt_t * certificate_list, | |||
465 | */ | 465 | */ |
466 | static int | 466 | static int |
467 | decode_ber_digest_info (const gnutls_datum_t * info, | 467 | decode_ber_digest_info (const gnutls_datum_t * info, |
468 | gnutls_mac_algorithm_t * hash, | 468 | enum MHD_GNUTLS_HashAlgorithm * hash, |
469 | opaque * digest, int *digest_size) | 469 | opaque * digest, int *digest_size) |
470 | { | 470 | { |
471 | ASN1_TYPE dinfo = ASN1_TYPE_EMPTY; | 471 | ASN1_TYPE dinfo = ASN1_TYPE_EMPTY; |
@@ -547,7 +547,7 @@ _pkcs1_rsa_verify_sig (const gnutls_datum_t * text, | |||
547 | const gnutls_datum_t * signature, | 547 | const gnutls_datum_t * signature, |
548 | mpi_t * params, int params_len) | 548 | mpi_t * params, int params_len) |
549 | { | 549 | { |
550 | gnutls_mac_algorithm_t hash = MHD_GNUTLS_MAC_UNKNOWN; | 550 | enum MHD_GNUTLS_HashAlgorithm hash = MHD_GNUTLS_MAC_UNKNOWN; |
551 | int ret; | 551 | int ret; |
552 | opaque digest[MAX_HASH_SIZE], md[MAX_HASH_SIZE]; | 552 | opaque digest[MAX_HASH_SIZE], md[MAX_HASH_SIZE]; |
553 | int digest_size; | 553 | int digest_size; |
@@ -637,7 +637,7 @@ dsa_verify_sig (const gnutls_datum_t * text, | |||
637 | static int | 637 | static int |
638 | verify_sig (const gnutls_datum_t * tbs, | 638 | verify_sig (const gnutls_datum_t * tbs, |
639 | const gnutls_datum_t * signature, | 639 | const gnutls_datum_t * signature, |
640 | gnutls_pk_algorithm_t pk, | 640 | enum MHD_GNUTLS_PublicKeyAlgorithm pk, |
641 | mpi_t * issuer_params, int issuer_params_size) | 641 | mpi_t * issuer_params, int issuer_params_size) |
642 | { | 642 | { |
643 | 643 | ||
diff --git a/src/daemon/https/x509/x509_write.c b/src/daemon/https/x509/x509_write.c index 516f034f..944b863c 100644 --- a/src/daemon/https/x509/x509_write.c +++ b/src/daemon/https/x509/x509_write.c | |||
@@ -591,7 +591,7 @@ gnutls_x509_crt_set_proxy (gnutls_x509_crt_t crt, | |||
591 | int | 591 | int |
592 | gnutls_x509_crt_sign2 (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, | 592 | gnutls_x509_crt_sign2 (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, |
593 | gnutls_x509_privkey_t issuer_key, | 593 | gnutls_x509_privkey_t issuer_key, |
594 | gnutls_digest_algorithm_t dig, unsigned int flags) | 594 | enum MHD_GNUTLS_HashAlgorithm dig, unsigned int flags) |
595 | { | 595 | { |
596 | int result; | 596 | int result; |
597 | 597 | ||
@@ -632,7 +632,7 @@ int | |||
632 | gnutls_x509_crt_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, | 632 | gnutls_x509_crt_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, |
633 | gnutls_x509_privkey_t issuer_key) | 633 | gnutls_x509_privkey_t issuer_key) |
634 | { | 634 | { |
635 | return gnutls_x509_crt_sign2 (crt, issuer, issuer_key, MHD_GNUTLS_DIG_SHA1, | 635 | return gnutls_x509_crt_sign2 (crt, issuer, issuer_key, MHD_GNUTLS_MAC_SHA1, |
636 | 0); | 636 | 0); |
637 | } | 637 | } |
638 | 638 | ||