Merge R21122 from mskrb-integ
authorSam Hartman <hartmans@mit.edu>
Thu, 4 Dec 2008 15:48:14 +0000 (15:48 +0000)
committerSam Hartman <hartmans@mit.edu>
Thu, 4 Dec 2008 15:48:14 +0000 (15:48 +0000)
Namespace cleanup

ticket: 6274
Status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21279 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/aead.c
src/lib/crypto/aead.h
src/lib/crypto/crypto_length.c
src/lib/crypto/decrypt.c
src/lib/crypto/encrypt.c
src/lib/crypto/encrypt_length.c

index 547aee861aef185be7cb0f5a747b0a352ae3a9f1..15aeb0c49215f1af0233d166bec122ce7b27c53a 100644 (file)
@@ -430,11 +430,11 @@ krb5int_c_iov_decrypt_stream(const struct krb5_aead_provider *aead,
 }
 
 krb5_error_code
-krb5int_padding_length(const struct krb5_aead_provider *aead,
-                      const struct krb5_enc_provider *enc,
-                      const struct krb5_hash_provider *hash,
-                      size_t data_length,
-                      unsigned int *pad_length)
+krb5int_c_padding_length(const struct krb5_aead_provider *aead,
+                        const struct krb5_enc_provider *enc,
+                        const struct krb5_hash_provider *hash,
+                        size_t data_length,
+                        unsigned int *pad_length)
 {
     unsigned int padding;
     krb5_error_code ret;
@@ -452,12 +452,12 @@ krb5int_padding_length(const struct krb5_aead_provider *aead,
 }
 
 krb5_error_code
-krb5int_encrypt_aead_compat(const struct krb5_aead_provider *aead,
-                           const struct krb5_enc_provider *enc,
-                           const struct krb5_hash_provider *hash,
-                           const krb5_keyblock *key, krb5_keyusage usage,
-                           const krb5_data *ivec, const krb5_data *input,
-                           krb5_data *output)
+krb5int_c_encrypt_aead_compat(const struct krb5_aead_provider *aead,
+                             const struct krb5_enc_provider *enc,
+                             const struct krb5_hash_provider *hash,
+                             const krb5_keyblock *key, krb5_keyusage usage,
+                             const krb5_data *ivec, const krb5_data *input,
+                             krb5_data *output)
 {
     krb5_crypto_iov iov[4];
     krb5_error_code ret;
@@ -470,7 +470,7 @@ krb5int_encrypt_aead_compat(const struct krb5_aead_provider *aead,
     if (ret != 0)
        return ret;
 
-    ret = krb5int_padding_length(aead, enc, hash, input->length, &padding_len);
+    ret = krb5int_c_padding_length(aead, enc, hash, input->length, &padding_len);
     if (ret != 0)
        return ret;
 
@@ -513,12 +513,12 @@ krb5int_encrypt_aead_compat(const struct krb5_aead_provider *aead,
 }
 
 krb5_error_code
-krb5int_decrypt_aead_compat(const struct krb5_aead_provider *aead,
-                           const struct krb5_enc_provider *enc,
-                           const struct krb5_hash_provider *hash,
-                           const krb5_keyblock *key, krb5_keyusage usage,
-                           const krb5_data *ivec, const krb5_data *input,
-                           krb5_data *output)
+krb5int_c_decrypt_aead_compat(const struct krb5_aead_provider *aead,
+                             const struct krb5_enc_provider *enc,
+                             const struct krb5_hash_provider *hash,
+                             const krb5_keyblock *key, krb5_keyusage usage,
+                             const krb5_data *ivec, const krb5_data *input,
+                             krb5_data *output)
 {
     krb5_crypto_iov iov[2];
     krb5_error_code ret;
@@ -546,17 +546,17 @@ krb5int_decrypt_aead_compat(const struct krb5_aead_provider *aead,
 }
 
 void
-krb5int_encrypt_length_aead_compat(const struct krb5_aead_provider *aead,
-                                  const struct krb5_enc_provider *enc,
-                                  const struct krb5_hash_provider *hash,
-                                  size_t inputlen, size_t *length)
+krb5int_c_encrypt_length_aead_compat(const struct krb5_aead_provider *aead,
+                                    const struct krb5_enc_provider *enc,
+                                    const struct krb5_hash_provider *hash,
+                                    size_t inputlen, size_t *length)
 {
     size_t header_len = 0;
     size_t padding_len = 0;
     size_t trailer_len = 0;
 
     aead->crypto_length(aead, enc, hash, KRB5_CRYPTO_TYPE_HEADER, &header_len);
-    krb5int_padding_length(aead, enc, hash, inputlen, &padding_len);
+    krb5int_c_padding_length(aead, enc, hash, inputlen, &padding_len);
     aead->crypto_length(aead, enc, hash, KRB5_CRYPTO_TYPE_TRAILER, &trailer_len);
 
     *length = header_len + inputlen + padding_len + trailer_len;
index 057d6a7d463e7da18bf77c103642844b0852b64e..d266ee65c41f65a6959d7f5ae2874b09a6160a28 100644 (file)
@@ -93,30 +93,30 @@ krb5int_c_iov_decrypt_stream(const struct krb5_aead_provider *aead,
                             size_t num_data);
 
 krb5_error_code
-krb5int_decrypt_aead_compat(const struct krb5_aead_provider *aead,
-                           const struct krb5_enc_provider *enc,
-                           const struct krb5_hash_provider *hash,
-                           const krb5_keyblock *key, krb5_keyusage usage,
-                           const krb5_data *ivec, const krb5_data *input,
-                           krb5_data *output);
+krb5int_c_decrypt_aead_compat(const struct krb5_aead_provider *aead,
+                             const struct krb5_enc_provider *enc,
+                             const struct krb5_hash_provider *hash,
+                             const krb5_keyblock *key, krb5_keyusage usage,
+                             const krb5_data *ivec, const krb5_data *input,
+                             krb5_data *output);
 
 krb5_error_code
-krb5int_encrypt_aead_compat(const struct krb5_aead_provider *aead,
-                           const struct krb5_enc_provider *enc,
-                           const struct krb5_hash_provider *hash,
-                           const krb5_keyblock *key, krb5_keyusage usage,
-                           const krb5_data *ivec, const krb5_data *input,
-                           krb5_data *output);
+krb5int_c_encrypt_aead_compat(const struct krb5_aead_provider *aead,
+                             const struct krb5_enc_provider *enc,
+                             const struct krb5_hash_provider *hash,
+                             const krb5_keyblock *key, krb5_keyusage usage,
+                             const krb5_data *ivec, const krb5_data *input,
+                             krb5_data *output);
 
 void
-krb5int_encrypt_length_aead_compat(const struct krb5_aead_provider *aead,
-                                  const struct krb5_enc_provider *enc,
-                                  const struct krb5_hash_provider *hash,
-                                  size_t inputlen, size_t *length);
+krb5int_c_encrypt_length_aead_compat(const struct krb5_aead_provider *aead,
+                                    const struct krb5_enc_provider *enc,
+                                    const struct krb5_hash_provider *hash,
+                                    size_t inputlen, size_t *length);
 
 krb5_error_code
-krb5int_padding_length(const struct krb5_aead_provider *aead,
-                      const struct krb5_enc_provider *enc,
-                      const struct krb5_hash_provider *hash,
-                      size_t data_length,
-                      unsigned int *pad_length);
+krb5int_c_padding_length(const struct krb5_aead_provider *aead,
+                        const struct krb5_enc_provider *enc,
+                        const struct krb5_hash_provider *hash,
+                        size_t data_length,
+                        unsigned int *pad_length);
index eb19b59905e40550bddd8652bed7e634912d39ff..f3930d6d3328012594af7dd3406027572e535bbc 100644 (file)
@@ -93,7 +93,7 @@ krb5_c_padding_length(krb5_context context,
        return KRB5_BAD_ENCTYPE;
     }
 
-    return krb5int_padding_length(ktp->aead, ktp->enc, ktp->hash, data_length, pad_length);
+    return krb5int_c_padding_length(ktp->aead, ktp->enc, ktp->hash, data_length, pad_length);
 }
 
 krb5_error_code KRB5_CALLCONV
@@ -155,7 +155,7 @@ krb5_c_crypto_length_iov(krb5_context context,
     if (ret != 0)
        return ret;
 
-    ret = krb5int_padding_length(ktp->aead, ktp->enc, ktp->hash, data_length, &pad_length);
+    ret = krb5int_c_padding_length(ktp->aead, ktp->enc, ktp->hash, data_length, &pad_length);
     if (ret != 0)
        return ret;
 
index 3c33c83c10598ec95d2c670bac8c85a3ccc042f5..74c38f6aa86e070f8d06030b37d5a1db96fdd7f4 100644 (file)
@@ -54,11 +54,11 @@ krb5_c_decrypt(krb5_context context, const krb5_keyblock *key,
     if (krb5_enctypes_list[i].decrypt == NULL) {
        assert(krb5_enctypes_list[i].aead != NULL);
 
-       return krb5int_decrypt_aead_compat(krb5_enctypes_list[i].aead,
-                                          krb5_enctypes_list[i].enc,
-                                          krb5_enctypes_list[i].hash,
-                                          key, usage, ivec,
-                                          &input->ciphertext, output);
+       return krb5int_c_decrypt_aead_compat(krb5_enctypes_list[i].aead,
+                                            krb5_enctypes_list[i].enc,
+                                            krb5_enctypes_list[i].hash,
+                                            key, usage, ivec,
+                                            &input->ciphertext, output);
     }
 
     return((*(krb5_enctypes_list[i].decrypt))
index 4147366751ed2662f14d591f4ac9f9df70b7cd89..a9a38aa77d1ec9613bcea4a7b53d372c025027af 100644 (file)
@@ -50,11 +50,11 @@ krb5_c_encrypt(krb5_context context, const krb5_keyblock *key,
     if (krb5_enctypes_list[i].encrypt == NULL) {
        assert(krb5_enctypes_list[i].aead != NULL);
 
-       return krb5int_encrypt_aead_compat(krb5_enctypes_list[i].aead,
-                                          krb5_enctypes_list[i].enc,
-                                          krb5_enctypes_list[i].hash,
-                                          key, usage, ivec,
-                                          input, &output->ciphertext);
+       return krb5int_c_encrypt_aead_compat(krb5_enctypes_list[i].aead,
+                                            krb5_enctypes_list[i].enc,
+                                            krb5_enctypes_list[i].hash,
+                                            key, usage, ivec,
+                                            input, &output->ciphertext);
     }
 
     return((*(krb5_enctypes_list[i].encrypt))
index fca1da24892f298df72e888556e077c3df2e06b1..a934b2a2100b32cc3b08f4bef8029ef690c467b0 100644 (file)
@@ -45,10 +45,10 @@ krb5_c_encrypt_length(krb5_context context, krb5_enctype enctype,
     if (krb5_enctypes_list[i].encrypt_len == NULL) {
        assert(krb5_enctypes_list[i].aead != NULL);
 
-       krb5int_encrypt_length_aead_compat(krb5_enctypes_list[i].aead,
-                                          krb5_enctypes_list[i].enc,
-                                          krb5_enctypes_list[i].hash,
-                                          inputlen, length);
+       krb5int_c_encrypt_length_aead_compat(krb5_enctypes_list[i].aead,
+                                            krb5_enctypes_list[i].enc,
+                                            krb5_enctypes_list[i].hash,
+                                            inputlen, length);
     } else {
        (*(krb5_enctypes_list[i].encrypt_len))
            (krb5_enctypes_list[i].enc, krb5_enctypes_list[i].hash,