Replace krb5_ with krb5Int_ prefix for non-API functions
authorZhanna Tsitkov <tsitkova@mit.edu>
Wed, 28 Oct 2009 18:12:38 +0000 (18:12 +0000)
committerZhanna Tsitkov <tsitkova@mit.edu>
Wed, 28 Oct 2009 18:12:38 +0000 (18:12 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23079 dc483132-0cff-0310-8789-dd5450dbe970

73 files changed:
src/include/k5-int.h
src/lib/crypto/builtin/aes/aes_s2k.c
src/lib/crypto/builtin/arcfour/arcfour.c
src/lib/crypto/builtin/arcfour/arcfour.h
src/lib/crypto/builtin/arcfour/arcfour_aead.c
src/lib/crypto/builtin/arcfour/arcfour_s2k.c
src/lib/crypto/builtin/hash_provider/hash_md4.c
src/lib/crypto/builtin/hash_provider/hash_md5.c
src/lib/crypto/builtin/hmac.c
src/lib/crypto/builtin/md4/md4.c
src/lib/crypto/builtin/md4/rsa-md4.h
src/lib/crypto/builtin/md5/md5.c
src/lib/crypto/builtin/md5/rsa-md5.h
src/lib/crypto/builtin/pbkdf2.c
src/lib/crypto/crypto_tests/t_mddriver.c
src/lib/crypto/crypto_tests/t_nfold.c
src/lib/crypto/crypto_tests/vectors.c
src/lib/crypto/krb/aead.c
src/lib/crypto/krb/checksum_length.c
src/lib/crypto/krb/cksumtype_to_string.c
src/lib/crypto/krb/cksumtypes.c
src/lib/crypto/krb/cksumtypes.h
src/lib/crypto/krb/coll_proof_cksum.c
src/lib/crypto/krb/combine_keys.c
src/lib/crypto/krb/dk/checksum.c
src/lib/crypto/krb/dk/derive.c
src/lib/crypto/krb/dk/dk.h
src/lib/crypto/krb/dk/dk_aead.c
src/lib/crypto/krb/dk/dk_decrypt.c
src/lib/crypto/krb/dk/dk_encrypt.c
src/lib/crypto/krb/dk/stringtokey.c
src/lib/crypto/krb/etypes.c
src/lib/crypto/krb/etypes.h
src/lib/crypto/krb/keyed_checksum_types.c
src/lib/crypto/krb/keyed_cksum.c
src/lib/crypto/krb/keyhash_provider/hmac_md5.c
src/lib/crypto/krb/keyhash_provider/k5_md4des.c
src/lib/crypto/krb/keyhash_provider/k5_md5des.c
src/lib/crypto/krb/keyhash_provider/md5_hmac.c
src/lib/crypto/krb/make_checksum.c
src/lib/crypto/krb/make_checksum_iov.c
src/lib/crypto/krb/nfold.c
src/lib/crypto/krb/old/old.h
src/lib/crypto/krb/old/old_decrypt.c
src/lib/crypto/krb/old/old_encrypt.c
src/lib/crypto/krb/prf/dk_prf.c
src/lib/crypto/krb/prf/rc4_prf.c
src/lib/crypto/krb/raw/raw.h
src/lib/crypto/krb/raw/raw_decrypt.c
src/lib/crypto/krb/raw/raw_encrypt.c
src/lib/crypto/krb/string_to_cksumtype.c
src/lib/crypto/krb/string_to_enctype.c
src/lib/crypto/krb/valid_cksumtype.c
src/lib/crypto/krb/valid_enctype.c
src/lib/crypto/krb/verify_checksum.c
src/lib/crypto/krb/verify_checksum_iov.c
src/lib/crypto/libk5crypto.exports
src/lib/crypto/openssl/aes/aes_s2k.c
src/lib/crypto/openssl/arcfour/arcfour.c
src/lib/crypto/openssl/arcfour/arcfour.h
src/lib/crypto/openssl/arcfour/arcfour_aead.c
src/lib/crypto/openssl/arcfour/arcfour_s2k.c
src/lib/crypto/openssl/hash_provider/hash_md4.c
src/lib/crypto/openssl/hash_provider/hash_md5.c
src/lib/crypto/openssl/hmac.c
src/lib/crypto/openssl/md4/md4.c
src/lib/crypto/openssl/md4/rsa-md4.h
src/lib/crypto/openssl/md5/md5.c
src/lib/crypto/openssl/md5/rsa-md5.h
src/lib/gssapi/krb5/util_crypt.c
src/lib/krb5/krb/init_ctx.c
src/lib/krb5/os/accessor.c
src/tests/misc/test_nfold.c

index 858b9bd6db71a2953c9c4986f074b9b2e443ff07..9217174f2ffa28be2a5ff3b5eb995be5abc6948c 100644 (file)
@@ -756,11 +756,11 @@ struct krb5_aead_provider {
  * in here to deal with stuff from lib/crypto
  */
 
-void krb5_nfold
+void krb5int_nfold
 (unsigned int inbits, const unsigned char *in,
                unsigned int outbits, unsigned char *out);
 
-krb5_error_code krb5_hmac
+krb5_error_code krb5int_hmac
 (const struct krb5_hash_provider *hash,
                krb5_key key, unsigned int icount,
                const krb5_data *input, krb5_data *output);
@@ -2227,7 +2227,7 @@ typedef struct _krb5int_access {
     /* crypto stuff */
     const struct krb5_hash_provider *md5_hash_provider;
     const struct krb5_enc_provider *arcfour_enc_provider;
-    krb5_error_code (* krb5_hmac) (const struct krb5_hash_provider *hash,
+    krb5_error_code (* krb5int_hmac) (const struct krb5_hash_provider *hash,
                                   const krb5_keyblock *key,
                                   unsigned int icount, const krb5_data *input,
                                   krb5_data *output);
@@ -2644,7 +2644,7 @@ typedef struct
 krb5_boolean krb5_is_permitted_enctype_ext 
          ( krb5_context, krb5_etypes_permitted *);
 
-krb5_boolean KRB5_CALLCONV krb5_c_weak_enctype(krb5_enctype);
+krb5_boolean KRB5_CALLCONV krb5int_c_weak_enctype(krb5_enctype);
 
 krb5_error_code krb5_kdc_rep_decrypt_proc
        (krb5_context,
index 76d73c635749181f58d6361f047e008689bb5975..14c7726bb6733e9c4de304c869d4268dfcf0a6bd 100644 (file)
@@ -81,7 +81,7 @@ krb5int_aes_string_to_key(const struct krb5_enc_provider *enc,
     if (err)
        goto cleanup;
 
-    err = krb5_derive_keyblock (enc, tempkey, key, &usage);
+    err = krb5int_derive_keyblock (enc, tempkey, key, &usage);
 
 cleanup:
     if (err)
index ad7ccec0b5fc005386eeb530ae79a656a13485ce..ff2f4378c3e532c1a2cd1751a76e74c95caf887b 100644 (file)
@@ -13,7 +13,7 @@ of RSA Data Security)
 const char *const krb5int_arcfour_l40 = "fortybits";
 
 void
-krb5_arcfour_encrypt_length(const struct krb5_enc_provider *enc,
+krb5int_arcfour_encrypt_length(const struct krb5_enc_provider *enc,
                            const struct krb5_hash_provider *hash,
                            size_t inputlen, size_t *length)
 {
@@ -62,7 +62,7 @@ case 7:                               /* tgs-req authenticator */
 }
 
 krb5_error_code
-krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
+krb5int_arcfour_encrypt(const struct krb5_enc_provider *enc,
                     const struct krb5_hash_provider *hash,
                     krb5_key key, krb5_keyusage usage,
                     const krb5_data *ivec, const krb5_data *input,
@@ -148,7 +148,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
     salt.length=4;
     store_32_le(ms_usage, salt.data);
   }
-  krb5_hmac(hash, key, 1, &salt, &d1);
+  krb5int_hmac(hash, key, 1, &salt, &d1);
 
   memcpy(k2.contents, k1.contents, k2.length);
 
@@ -192,7 +192,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
 
 /* This is the arcfour-hmac decryption routine */
 krb5_error_code
-krb5_arcfour_decrypt(const struct krb5_enc_provider *enc,
+krb5int_arcfour_decrypt(const struct krb5_enc_provider *enc,
                     const struct krb5_hash_provider *hash,
                     krb5_key key, krb5_keyusage usage,
                     const krb5_data *ivec, const krb5_data *input,
@@ -275,7 +275,7 @@ krb5_arcfour_decrypt(const struct krb5_enc_provider *enc,
          salt.length = 4;
          store_32_le(ms_usage, salt.data);
       }
-      ret = krb5_hmac(hash, key, 1, &salt, &d1);
+      ret = krb5int_hmac(hash, key, 1, &salt, &d1);
       if (ret)
          goto cleanup;
 
index 1a2876437d96e0e9f98bef92c36b031f9b023380..e00708a7c7d0f97cc2590f17722c88bd72f754a8 100644 (file)
@@ -2,13 +2,13 @@
 #define ARCFOUR_H
 
 extern void
-krb5_arcfour_encrypt_length(const struct krb5_enc_provider *,
+krb5int_arcfour_encrypt_length(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        size_t,
                        size_t *);
 
-extern 
-krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *,
+extern krb5_error_code
+krb5int_arcfour_encrypt(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        krb5_key,
                        krb5_keyusage,
@@ -16,8 +16,8 @@ krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *,
                        const krb5_data *,
                        krb5_data *);
 
-extern 
-krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *,
+extern krb5_error_code
+krb5int_arcfour_decrypt(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        krb5_key,
                        krb5_keyusage,
@@ -25,7 +25,8 @@ krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *,
                        const krb5_data *,
                        krb5_data *);
 
-extern krb5_error_code krb5int_arcfour_string_to_key(
+extern krb5_error_code
+krb5int_arcfour_string_to_key(
      const struct krb5_enc_provider *,
      const krb5_data *,
      const krb5_data *,
index 4896afaaf4bb0297350102f368762f5ae369a576..c01fc001b906baaebfc14cd30c23b6d61bd194e1 100644 (file)
@@ -152,7 +152,7 @@ krb5int_arcfour_encrypt_iov(const struct krb5_aead_provider *aead,
        salt.length = 4;
        store_32_le(ms_usage, salt.data);
     }
-    ret = krb5_hmac(hash, key, 1, &salt, &d1);
+    ret = krb5int_hmac(hash, key, 1, &salt, &d1);
     if (ret != 0)
        goto cleanup;
 
@@ -272,7 +272,7 @@ krb5int_arcfour_decrypt_iov(const struct krb5_aead_provider *aead,
        salt.length = 4;
        store_32_le(ms_usage, (unsigned char *)salt.data);
     }
-    ret = krb5_hmac(hash, key, 1, &salt, &d1);
+    ret = krb5int_hmac(hash, key, 1, &salt, &d1);
     if (ret != 0)
        goto cleanup;
 
index 41053ed17da9dfd57b2568a8f0ae7b274fb15b94..09c9b7689bb47ac338f7b8f72c54b4fb9540f484 100644 (file)
@@ -35,9 +35,9 @@ krb5int_arcfour_string_to_key(const struct krb5_enc_provider *enc,
     return err;
 
   /* the actual MD4 hash of the data */
-  krb5_MD4Init(&md4_context);
-  krb5_MD4Update(&md4_context, copystr, copystrlen);
-  krb5_MD4Final(&md4_context);
+  krb5int_MD4Init(&md4_context);
+  krb5int_MD4Update(&md4_context, copystr, copystrlen);
+  krb5int_MD4Final(&md4_context);
   memcpy(key->contents, md4_context.digest, 16);
 
 #if 0  
index f507aaaf7dfafe5b2a80a8396f82a6419b9e9388..3a4a4d5303175ccfd4bb016d50cf6826b77c9bd3 100644 (file)
@@ -38,10 +38,10 @@ k5_md4_hash(unsigned int icount, const krb5_data *input,
     if (output->length != RSA_MD4_CKSUM_LENGTH)
        return(KRB5_CRYPTO_INTERNAL);
 
-    krb5_MD4Init(&ctx);
+    krb5int_MD4Init(&ctx);
     for (i=0; i<icount; i++)
-       krb5_MD4Update(&ctx, (unsigned char *) input[i].data, input[i].length);
-    krb5_MD4Final(&ctx);
+       krb5int_MD4Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5int_MD4Final(&ctx);
 
     memcpy(output->data, ctx.digest, RSA_MD4_CKSUM_LENGTH);
 
index a6e380ae2dc2062f6516dbef9487a6161ae88ce2..10840d0d990b2b4cb34c82185d9f7325b194ab85 100644 (file)
@@ -38,10 +38,10 @@ k5_md5_hash(unsigned int icount, const krb5_data *input,
     if (output->length != RSA_MD5_CKSUM_LENGTH)
        return(KRB5_CRYPTO_INTERNAL);
 
-    krb5_MD5Init(&ctx);
+    krb5int_MD5Init(&ctx);
     for (i=0; i<icount; i++)
-       krb5_MD5Update(&ctx, (unsigned char *) input[i].data, input[i].length);
-    krb5_MD5Final(&ctx);
+       krb5int_MD5Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5int_MD5Final(&ctx);
 
     memcpy(output->data, ctx.digest, RSA_MD5_CKSUM_LENGTH);
 
index 6726a08262c6a263e3f32da473755809f23ab5ed..d1be17e9cef0fb3632994ce681ea7ddcd4021d49 100644 (file)
@@ -178,7 +178,7 @@ krb5int_hmac_iov_keyblock(const struct krb5_hash_provider *hash,
 }
 
 krb5_error_code
-krb5_hmac(const struct krb5_hash_provider *hash, krb5_key key,
+krb5int_hmac(const struct krb5_hash_provider *hash, krb5_key key,
          unsigned int icount, const krb5_data *input, krb5_data *output)
 {
     return krb5int_hmac_keyblock(hash, &key->keyblock, icount, input, output);
index 7922c71ed0f77e0585b9fd2f1f0dd76e40fbe65b..b36a476139d949a6cc1fb05da7d09445ae9ed55f 100644 (file)
@@ -76,7 +76,7 @@ static const unsigned char PADDING[64] = {
    (a) = ROTATE_LEFT ((a), (s));}
 
 void
-krb5_MD4Init (krb5_MD4_CTX *mdContext)
+krb5int_MD4Init (krb5_MD4_CTX *mdContext)
 {
   mdContext->i[0] = mdContext->i[1] = (krb5_ui_4)0;
 
@@ -89,7 +89,7 @@ krb5_MD4Init (krb5_MD4_CTX *mdContext)
 }
 
 void
-krb5_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
+krb5int_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -120,7 +120,7 @@ krb5_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned in
 }
 
 void
-krb5_MD4Final (krb5_MD4_CTX *mdContext)
+krb5int_MD4Final (krb5_MD4_CTX *mdContext)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -136,7 +136,7 @@ krb5_MD4Final (krb5_MD4_CTX *mdContext)
 
   /* pad out to 56 mod 64 */
   padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
-  krb5_MD4Update (mdContext, PADDING, padLen);
+  krb5int_MD4Update (mdContext, PADDING, padLen);
 
   /* append length in bits and transform */
   for (i = 0, ii = 0; i < 14; i++, ii += 4)
index d4e6f6b79c05e6d62efab30481bc63ee11207e7e..f4272d5ffe44aa5213614709d0de82ae55950f6b 100644 (file)
@@ -82,9 +82,9 @@ typedef struct {
   unsigned char digest[16];            /* actual digest after MD4Final call */
 } krb5_MD4_CTX;
 
-extern void krb5_MD4Init(krb5_MD4_CTX *);
-extern void krb5_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int);
-extern void krb5_MD4Final(krb5_MD4_CTX *);
+extern void krb5int_MD4Init(krb5_MD4_CTX *);
+extern void krb5int_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int);
+extern void krb5int_MD4Final(krb5_MD4_CTX *);
 
 /*
  **********************************************************************
index e548dbc3a95482eabc93a9bcf0ffe1c37eec6b6c..8f04be426242f4988089db7e37064b828d7e709b 100644 (file)
@@ -42,9 +42,9 @@
  ***********************************************************************
  **  Message-digest routines:                                         **
  **  To form the message digest for a message M                       **
- **    (1) Initialize a context buffer mdContext using krb5_MD5Init   **
- **    (2) Call krb5_MD5Update on mdContext and M                     **
- **    (3) Call krb5_MD5Final on mdContext                            **
+ **    (1) Initialize a context buffer mdContext using krb5int_MD5Init   **
+ **    (2) Call krb5int_MD5Update on mdContext and M                     **
+ **    (3) Call krb5int_MD5Final on mdContext                            **
  **  The message digest is now in mdContext->digest[0...15]           **
  ***********************************************************************
  */
@@ -103,11 +103,11 @@ static const unsigned char PADDING[64] = {
    (a) &= 0xffffffff; \
   }
 
-/* The routine krb5_MD5Init initializes the message-digest context
+/* The routine krb5int_MD5Init initializes the message-digest context
    mdContext. All fields are set to zero.
  */
 void 
-krb5_MD5Init (krb5_MD5_CTX *mdContext)
+krb5int_MD5Init (krb5_MD5_CTX *mdContext)
 {
   mdContext->i[0] = mdContext->i[1] = (krb5_ui_4)0;
 
@@ -119,12 +119,12 @@ krb5_MD5Init (krb5_MD5_CTX *mdContext)
   mdContext->buf[3] = 0x10325476UL;
 }
 
-/* The routine krb5_MD5Update updates the message-digest context to
+/* The routine krb5int_MD5Update updates the message-digest context to
    account for the presence of each of the characters inBuf[0..inLen-1]
    in the message whose digest is being computed.
  */
 void
-krb5_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
+krb5int_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -153,11 +153,11 @@ krb5_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned in
   }
 }
 
-/* The routine krb5_MD5Final terminates the message-digest computation and
+/* The routine krb5int_MD5Final terminates the message-digest computation and
    ends with the desired message digest in mdContext->digest[0...15].
  */
 void
-krb5_MD5Final (krb5_MD5_CTX *mdContext)
+krb5int_MD5Final (krb5_MD5_CTX *mdContext)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -173,7 +173,7 @@ krb5_MD5Final (krb5_MD5_CTX *mdContext)
 
   /* pad out to 56 mod 64 */
   padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
-  krb5_MD5Update (mdContext, PADDING, padLen);
+  krb5int_MD5Update (mdContext, PADDING, padLen);
 
   /* append length in bits and transform */
   for (i = 0, ii = 0; i < 14; i++, ii += 4)
index 846b23856aadd8a05d64dbc991f05d04ff2502c7..938b22d7a50c15f79062f5f710c94267f0bca8e1 100644 (file)
@@ -48,9 +48,9 @@ typedef struct {
   unsigned char digest[16];            /* actual digest after MD5Final call */
 } krb5_MD5_CTX;
 
-extern void krb5_MD5Init(krb5_MD5_CTX *);
-extern void krb5_MD5Update(krb5_MD5_CTX *,const unsigned char *,unsigned int);
-extern void krb5_MD5Final(krb5_MD5_CTX *);
+extern void krb5int_MD5Init(krb5_MD5_CTX *);
+extern void krb5int_MD5Update(krb5_MD5_CTX *,const unsigned char *,unsigned int);
+extern void krb5int_MD5Final(krb5_MD5_CTX *);
 
 #define        RSA_MD5_CKSUM_LENGTH            16
 #define        OLD_RSA_MD5_DES_CKSUM_LENGTH    16
index 9201e23b09e09bdc68edfc52023e53149a980fb6..96409ba28d98b8d91d70c2b4fc405bcbc4e93419 100644 (file)
@@ -223,7 +223,7 @@ hmac_sha1(krb5_key pass, krb5_data *salt, krb5_data *out)
 
     if (debug_hmac)
        printd(" hmac input", salt);
-    err = krb5_hmac(h, pass, 1, salt, out);
+    err = krb5int_hmac(h, pass, 1, salt, out);
     if (err == 0 && debug_hmac)
        printd(" hmac output", out);
     return err;
index d894aaaecb7b57d0d804f19f31466ddeb57eaff0..2c0210cac497a0b589257b11ccd8f874dde60e4c 100644 (file)
@@ -58,9 +58,9 @@ struct md_test_entry {
 
 #if MD == 4
 #define MD_CTX krb5_MD4_CTX
-#define MDInit krb5_MD4Init
-#define MDUpdate krb5_MD4Update
-#define MDFinal krb5_MD4Final
+#define MDInit krb5int_MD4Init
+#define MDUpdate krb5int_MD4Update
+#define MDFinal krb5int_MD4Final
 
 #define HAVE_TEST_SUITE
 /* Test suite from RFC 1320 */
@@ -94,9 +94,9 @@ struct md_test_entry md_test_suite[] = {
 
 #if MD == 5
 #define MD_CTX krb5_MD5_CTX
-#define MDInit krb5_MD5Init
-#define MDUpdate krb5_MD5Update
-#define MDFinal krb5_MD5Final
+#define MDInit krb5int_MD5Init
+#define MDUpdate krb5int_MD5Update
+#define MDFinal krb5int_MD5Final
 
 #define HAVE_TEST_SUITE
 /* Test suite from RFC 1321 */
index 6be0a09345fcc41124bd48ac3d141e47fc3c95a4..2b5b0e3f8af23c238bd6b81c3401fc1a38672d64 100644 (file)
@@ -82,7 +82,7 @@ static void rfc_tests ()
     for (i = 0; i < ASIZE (tests); i++) {
        unsigned char *p = (unsigned char *) tests[i].input;
        assert (tests[i].n / 8 <= sizeof (outbuf));
-       krb5_nfold (8 * strlen ((char *) p), p, tests[i].n, outbuf);
+       krb5int_nfold (8 * strlen ((char *) p), p, tests[i].n, outbuf);
        printf ("%d-fold(\"%s\") =\n", tests[i].n, p);
        printf ("%d-fold(", tests[i].n);
        printstringhex (p);
@@ -106,7 +106,7 @@ static void fold_kerberos(unsigned int nbytes)
        abort();
 
     printf("%d-fold(\"kerberos\") =\n\t", nbytes*8);
-    krb5_nfold(64, (unsigned char *) "kerberos", 8*nbytes, cipher_text);
+    krb5int_nfold(64, (unsigned char *) "kerberos", 8*nbytes, cipher_text);
     for (j=0; j<nbytes; j++)
        printf("%s%02x", (j&3) ? "" : " ", cipher_text[j]);
     printf("\n");
@@ -142,7 +142,7 @@ main(argc, argv)
        printf("\tInput:\t\"%.*s\"\n", (int) strlen((char *) nfold_in[i]), 
               nfold_in[i]);
        printf("\t192-Fold:\t");
-       krb5_nfold(strlen((char *) nfold_in[i])*8, nfold_in[i], 24*8, 
+       krb5int_nfold(strlen((char *) nfold_in[i])*8, nfold_in[i], 24*8,
                   cipher_text);
        for (j=0; j<24; j++)
            printf("%s%02x", (j&3) ? "" : " ", cipher_text[j]);
index 64a5071c07d76d30c98be251577d5812c07605e6..e4a46be850c4fad3c308ea3e8e18ed3452ec2733 100644 (file)
@@ -78,7 +78,7 @@ static void test_nfold ()
        printf ("%d-fold(", tests[i].n);
        printstringhex (p);
        printf (") =\n\t");
-       krb5_nfold (8 * strlen (p), p, tests[i].n, outbuf);
+       krb5int_nfold (8 * strlen (p), p, tests[i].n, outbuf);
        printhex (tests[i].n / 8U, outbuf);
        printf ("\n\n");
     }
@@ -218,7 +218,7 @@ void DK (krb5_keyblock *out, krb5_keyblock *in, const krb5_data *usage) {
 
 void DR (krb5_data *out, krb5_keyblock *in, const krb5_data *usage) {
     krb5_error_code r;
-    r = krb5_derive_random (enc, in, out, usage);
+    r = krb5int_derive_random (enc, in, out, usage);
     CHECK;
 }
 
index 3b11da5dc2ae5b86486fa5505de91ec2e2b1eed2..fd9a50e0b4422a776bee9992d31326d494e4847a 100644 (file)
@@ -147,15 +147,15 @@ krb5int_c_find_checksum_type(krb5_cksumtype cksumtype)
 {
     size_t i;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksumtype)
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksumtype)
            break;
     }
 
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return NULL;
 
-    return &krb5_cksumtypes_list[i];
+    return &krb5int_cksumtypes_list[i];
 }
 
 #ifdef DEBUG_IOV
index 1af4d17f206bf30ba7fa870a25f84053dae55767..aeb057cbb5e88beb54de207287c1a6a415c55b25 100644 (file)
@@ -33,20 +33,20 @@ krb5_c_checksum_length(krb5_context context, krb5_cksumtype cksumtype,
 {
     unsigned int i;
 
-    for (i=0; i<krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksumtype)
+    for (i=0; i<krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksumtype)
            break;
     }
 
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return KRB5_BAD_ENCTYPE;
 
-    if (krb5_cksumtypes_list[i].keyhash)
-       *length = krb5_cksumtypes_list[i].keyhash->hashsize;
-    else if (krb5_cksumtypes_list[i].trunc_size)
-       *length = krb5_cksumtypes_list[i].trunc_size;
+    if (krb5int_cksumtypes_list[i].keyhash)
+       *length = krb5int_cksumtypes_list[i].keyhash->hashsize;
+    else if (krb5int_cksumtypes_list[i].trunc_size)
+       *length = krb5int_cksumtypes_list[i].trunc_size;
     else
-       *length = krb5_cksumtypes_list[i].hash->hashsize;
+       *length = krb5int_cksumtypes_list[i].hash->hashsize;
 
     return 0;
 }
index 82e0702c80bb7520f3191848129478870407a779..d97476623ac8e8874df4031de3541b327cf0006d 100644 (file)
@@ -32,9 +32,9 @@ krb5_cksumtype_to_string(krb5_cksumtype cksumtype, char *buffer, size_t buflen)
 {
     unsigned int i;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksumtype) {
-           if (strlcpy(buffer, krb5_cksumtypes_list[i].out_string,
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksumtype) {
+           if (strlcpy(buffer, krb5int_cksumtypes_list[i].out_string,
                        buflen) >= buflen)
                return ENOMEM;
            return 0;
index 2b5f33d30ac308b82206e47fc7eafddcd2c942b1..e03c0adc80e1060ea486ecbea340b5cb06b6c55d 100644 (file)
@@ -29,7 +29,7 @@
 #include "keyhash_provider.h"
 #include "cksumtypes.h"
 
-const struct krb5_cksumtypes krb5_cksumtypes_list[] = {
+const struct krb5_cksumtypes krb5int_cksumtypes_list[] = {
     { CKSUMTYPE_CRC32, KRB5_CKSUMFLAG_NOT_COLL_PROOF,
       "crc32", { 0 }, "CRC-32",
       0, NULL,
@@ -87,5 +87,5 @@ const struct krb5_cksumtypes krb5_cksumtypes_list[] = {
       NULL }
 };
 
-const unsigned int krb5_cksumtypes_length =
-    sizeof(krb5_cksumtypes_list) / sizeof(struct krb5_cksumtypes);
+const unsigned int krb5int_cksumtypes_length =
+    sizeof(krb5int_cksumtypes_list) / sizeof(struct krb5_cksumtypes);
index 05e7be6c265556d1dbb014ffb98227f08f8ce0b2..10d8ccd53c3b7f510239f12deb32d660026c3afe 100644 (file)
@@ -63,6 +63,6 @@ struct krb5_cksumtypes {
 #define KRB5_CKSUMFLAG_DERIVE          0x0001
 #define KRB5_CKSUMFLAG_NOT_COLL_PROOF  0x0002
 
-extern const struct krb5_cksumtypes krb5_cksumtypes_list[];
-extern const unsigned int krb5_cksumtypes_length;
+extern const struct krb5_cksumtypes krb5int_cksumtypes_list[];
+extern const unsigned int krb5int_cksumtypes_length;
 #endif
index d66863e1d86fed522d0ce183d09c035c825d56d8..08b4ccb11bfe7266ad0cd71492a5293f774aabb5 100644 (file)
@@ -32,9 +32,9 @@ krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype)
 {
     unsigned int i;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == ctype)
-           return((krb5_cksumtypes_list[i].flags &
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == ctype)
+           return((krb5int_cksumtypes_list[i].flags &
                    KRB5_CKSUMFLAG_NOT_COLL_PROOF) ? FALSE : TRUE);
     }
 
index acfb99bbdbb61b654e7184cf37c60aafdbdeed4a..0cf3f6f10aefda86c1c91c3a18f8dc1c3861a0f9 100644 (file)
@@ -137,14 +137,14 @@ krb5int_c_combine_keys(krb5_context context, krb5_keyblock *key1,
     /*
      * Concatenate the two keys together, and then run them through
      * n-fold to reduce them to a length appropriate for the random-to-key
-     * operation.  Note here that krb5_nfold() takes sizes in bits, hence
+     * operation.  Note here that krb5int_nfold() takes sizes in bits, hence
      * the multiply by 8.
      */
 
     memcpy(combined, r1, keybytes);
     memcpy(combined + keybytes, r2, keybytes);
 
-    krb5_nfold((keybytes * 2) * 8, combined, keybytes * 8, rnd);
+    krb5int_nfold((keybytes * 2) * 8, combined, keybytes * 8, rnd);
 
     /*
      * Run the "random" bits through random-to-key to produce a encryption
@@ -190,7 +190,7 @@ krb5int_c_combine_keys(krb5_context context, krb5_keyblock *key1,
        myalloc = TRUE;
     }
 
-    ret = krb5_derive_keyblock(enc, tkey, outkey, &input);
+    ret = krb5int_derive_keyblock(enc, tkey, outkey, &input);
     if (ret) {
        if (myalloc) {
            free(outkey->contents);
@@ -248,7 +248,7 @@ dr(const struct krb5_enc_provider *enc, const krb5_keyblock *inkey,
     if (in_constant->length == inblock.length) {
        memcpy(inblock.data, in_constant->data, inblock.length);
     } else {
-       krb5_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
+       krb5int_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
                   inblock.length*8, (unsigned char *) inblock.data);
     }
 
index 31e7de90efe066721baafb5259eabb86a35cbd06..e5087e7420508d26df020043a0090f317e05f860 100644 (file)
@@ -32,7 +32,7 @@
 #define K5CLENGTH 5 /* 32 bit net byte order integer + one byte seed */
 
 krb5_error_code
-krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
+krb5int_dk_make_checksum(const struct krb5_hash_provider *hash,
                      krb5_key key, krb5_keyusage usage,
                      const krb5_data *input, krb5_data *output)
 {
@@ -50,7 +50,7 @@ krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
 
     /*
      * key->length will be tested in enc->encrypt.
-     * output->length will be tested in krb5_hmac.
+     * output->length will be tested in krb5int_hmac.
      */
 
     /* Derive the key. */
@@ -62,7 +62,7 @@ krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
 
     datain.data[4] = (char) 0x99;
 
-    ret = krb5_derive_key(enc, key, &kc, &datain);
+    ret = krb5int_derive_key(enc, key, &kc, &datain);
     if (ret)
        return ret;
 
@@ -70,7 +70,7 @@ krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
 
     datain = *input;
 
-    ret = krb5_hmac(hash, kc, 1, &datain, output);
+    ret = krb5int_hmac(hash, kc, 1, &datain, output);
     if (ret)
        memset(output->data, 0, output->length);
 
@@ -98,7 +98,7 @@ krb5int_dk_make_checksum_iov(const struct krb5_hash_provider *hash,
 
     /*
      * key->length will be tested in enc->encrypt.
-     * output->length will be tested in krb5_hmac.
+     * output->length will be tested in krb5int_hmac.
      */
 
     /* Derive the key. */
@@ -110,7 +110,7 @@ krb5int_dk_make_checksum_iov(const struct krb5_hash_provider *hash,
 
     datain.data[4] = (char) 0x99;
 
-    ret = krb5_derive_key(enc, key, &kc, &datain);
+    ret = krb5int_derive_key(enc, key, &kc, &datain);
     if (ret)
        return ret;
 
index c2638e804efb3ff025d6825674a036fb858789d4..bcd11143516d3d6617b0e107c0484692ad32b61a 100644 (file)
@@ -80,12 +80,12 @@ cleanup:
 
 /*
  * Compute a derived key into the keyblock outkey.  This variation on
- * krb5_derive_key does not cache the result, as it is only used
+ * krb5int_derive_key does not cache the result, as it is only used
  * directly in situations which are not expected to be repeated with
  * the same inkey and constant.
  */
 krb5_error_code
-krb5_derive_keyblock(const struct krb5_enc_provider *enc,
+krb5int_derive_keyblock(const struct krb5_enc_provider *enc,
                     krb5_key inkey, krb5_keyblock *outkey,
                     const krb5_data *in_constant)
 {
@@ -123,7 +123,7 @@ krb5_derive_keyblock(const struct krb5_enc_provider *enc,
     if (in_constant->length == inblock.length) {
        memcpy(inblock.data, in_constant->data, inblock.length);
     } else {
-       krb5_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
+       krb5int_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
                   inblock.length*8, (unsigned char *) inblock.data);
     }
 
@@ -162,7 +162,7 @@ cleanup:
 }
 
 krb5_error_code
-krb5_derive_key(const struct krb5_enc_provider *enc,
+krb5int_derive_key(const struct krb5_enc_provider *enc,
                krb5_key inkey, krb5_key *outkey,
                const krb5_data *in_constant)
 {
@@ -184,7 +184,7 @@ krb5_derive_key(const struct krb5_enc_provider *enc,
     keyblock.contents = malloc(keyblock.length);
     if (keyblock.contents == NULL)
        return ENOMEM;
-    ret = krb5_derive_keyblock(enc, inkey, &keyblock, in_constant);
+    ret = krb5int_derive_keyblock(enc, inkey, &keyblock, in_constant);
     if (ret)
        goto cleanup;
 
@@ -201,7 +201,7 @@ cleanup:
 }
 
 krb5_error_code
-krb5_derive_random(const struct krb5_enc_provider *enc,
+krb5int_derive_random(const struct krb5_enc_provider *enc,
                   krb5_key inkey, krb5_data *outrnd,
                   const krb5_data *in_constant)
 {
@@ -238,7 +238,7 @@ krb5_derive_random(const struct krb5_enc_provider *enc,
     if (in_constant->length == inblock.length) {
        memcpy(inblock.data, in_constant->data, inblock.length);
     } else {
-       krb5_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
+       krb5int_nfold(in_constant->length*8, (unsigned char *) in_constant->data,
                   inblock.length*8, (unsigned char *) inblock.data);
     }
 
index 6566ce8d5a9c182ab55a2f0ad93dd25859a84a9c..67cbf1397de0aabf5c9fb5d03cb56f32fb5ecabc 100644 (file)
 
 #include "k5-int.h"
 
-void krb5_dk_encrypt_length(const struct krb5_enc_provider *enc,
+void
+krb5int_dk_encrypt_length(const struct krb5_enc_provider *enc,
                            const struct krb5_hash_provider *hash,
                            size_t input, size_t *length);
 
-krb5_error_code krb5_dk_encrypt(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_dk_encrypt(const struct krb5_enc_provider *enc,
                                const struct krb5_hash_provider *hash,
                                krb5_key key, krb5_keyusage usage,
                                const krb5_data *ivec,
                                const krb5_data *input, krb5_data *output);
 
-void krb5int_aes_encrypt_length(const struct krb5_enc_provider *enc,
+void
+krb5int_aes_encrypt_length(const struct krb5_enc_provider *enc,
                                const struct krb5_hash_provider *hash,
                                size_t input, size_t *length);
 
-krb5_error_code krb5int_aes_dk_encrypt(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_aes_dk_encrypt(const struct krb5_enc_provider *enc,
                                       const struct krb5_hash_provider *hash,
                                       krb5_key key,
                                       krb5_keyusage usage,
@@ -48,13 +52,15 @@ krb5_error_code krb5int_aes_dk_encrypt(const struct krb5_enc_provider *enc,
                                       const krb5_data *input,
                                       krb5_data *output);
 
-krb5_error_code krb5_dk_decrypt(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_dk_decrypt(const struct krb5_enc_provider *enc,
                                const struct krb5_hash_provider *hash,
                                krb5_key key, krb5_keyusage usage,
                                const krb5_data *ivec, const krb5_data *input,
                                krb5_data *arg_output);
 
-krb5_error_code krb5int_aes_dk_decrypt(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_aes_dk_decrypt(const struct krb5_enc_provider *enc,
                                       const struct krb5_hash_provider *hash,
                                       krb5_key key,
                                       krb5_keyusage usage,
@@ -62,23 +68,27 @@ krb5_error_code krb5int_aes_dk_decrypt(const struct krb5_enc_provider *enc,
                                       const krb5_data *input,
                                       krb5_data *arg_output);
 
-krb5_error_code krb5int_dk_string_to_key(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_dk_string_to_key(const struct krb5_enc_provider *enc,
                                         const krb5_data *string,
                                         const krb5_data *salt,
                                         const krb5_data *params,
                                         krb5_keyblock *key);
 
-krb5_error_code krb5_derive_keyblock(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5int_derive_keyblock(const struct krb5_enc_provider *enc,
                                     krb5_key inkey,
                                     krb5_keyblock *outkey,
                                     const krb5_data *in_constant);
 
-krb5_error_code krb5_derive_key(const struct krb5_enc_provider *enc,
+krb5_error_code
+krb5_derive_key(const struct krb5_enc_provider *enc,
                                krb5_key inkey,
                                krb5_key *outkey,
                                const krb5_data *in_constant);
 
-krb5_error_code krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
+krb5_error_code
+krb5int_dk_make_checksum(const struct krb5_hash_provider *hash,
                                      krb5_key key,
                                      krb5_keyusage usage,
                                      const krb5_data *input,
@@ -91,7 +101,7 @@ krb5int_dk_make_checksum_iov(const struct krb5_hash_provider *hash,
                             krb5_data *output);
 
 krb5_error_code
-krb5_derive_random(const struct krb5_enc_provider *enc,
+krb5int_derive_random(const struct krb5_enc_provider *enc,
                   krb5_key inkey, krb5_data *outrnd,
                   const krb5_data *in_constant);
 
index 5c9c1ad5c7caacadb041f9a1145959ff9054a2a3..e35ca5549ada78a438ad442541e0614320c9f1e5 100644 (file)
@@ -136,13 +136,13 @@ krb5int_dk_encrypt_iov(const struct krb5_aead_provider *aead,
 
     d1.data[4] = 0xAA;
 
-    ret = krb5_derive_key(enc, key, &ke, &d1);
+    ret = krb5int_derive_key(enc, key, &ke, &d1);
     if (ret != 0)
        goto cleanup;
 
     d1.data[4] = 0x55;
 
-    ret = krb5_derive_key(enc, key, &ki, &d1);
+    ret = krb5int_derive_key(enc, key, &ki, &d1);
     if (ret != 0)
        goto cleanup;
 
@@ -261,13 +261,13 @@ krb5int_dk_decrypt_iov(const struct krb5_aead_provider *aead,
 
     d1.data[4] = 0xAA;
 
-    ret = krb5_derive_key(enc, key, &ke, &d1);
+    ret = krb5int_derive_key(enc, key, &ke, &d1);
     if (ret != 0)
        goto cleanup;
 
     d1.data[4] = 0x55;
 
-    ret = krb5_derive_key(enc, key, &ki, &d1);
+    ret = krb5int_derive_key(enc, key, &ki, &d1);
     if (ret != 0)
        goto cleanup;
 
index abb7a39b063a92e2fa2c703903c989ed7a57858c..9535a75549a9df098bbdca3278191e3251415beb 100644 (file)
@@ -41,7 +41,7 @@ krb5_dk_decrypt_maybe_trunc_hmac(const struct krb5_enc_provider *enc,
                                 int ivec_mode);
 
 krb5_error_code
-krb5_dk_decrypt(const struct krb5_enc_provider *enc,
+krb5int_dk_decrypt(const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
                const krb5_data *ivec, const krb5_data *input,
@@ -104,13 +104,13 @@ krb5_dk_decrypt_maybe_trunc_hmac(const struct krb5_enc_provider *enc,
 
     d1.data[4] = (char) 0xAA;
 
-    ret = krb5_derive_key(enc, key, &ke, &d1);
+    ret = krb5int_derive_key(enc, key, &ke, &d1);
     if (ret != 0)
        goto cleanup;
 
     d1.data[4] = 0x55;
 
-    ret = krb5_derive_key(enc, key, &ki, &d1);
+    ret = krb5int_derive_key(enc, key, &ki, &d1);
     if (ret != 0)
        goto cleanup;
 
@@ -142,7 +142,7 @@ krb5_dk_decrypt_maybe_trunc_hmac(const struct krb5_enc_provider *enc,
     d1.length = hashsize;
     d1.data = (char *) cksum;
 
-    ret = krb5_hmac(hash, ki, 1, &d2, &d1);
+    ret = krb5int_hmac(hash, ki, 1, &d2, &d1);
     if (ret != 0)
        goto cleanup;
 
index bb045fa6b064632b2588dc836faafc33ceca38dd..b44671abee77be01fb3f51cafa29b09602675ae7 100644 (file)
@@ -39,7 +39,7 @@
  */
 
 void
-krb5_dk_encrypt_length(const struct krb5_enc_provider *enc,
+krb5int_dk_encrypt_length(const struct krb5_enc_provider *enc,
                       const struct krb5_hash_provider *hash,
                       size_t inputlen, size_t *length)
 {
@@ -51,7 +51,7 @@ krb5_dk_encrypt_length(const struct krb5_enc_provider *enc,
 }
 
 krb5_error_code
-krb5_dk_encrypt(const struct krb5_enc_provider *enc,
+krb5int_dk_encrypt(const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
                const krb5_data *ivec, const krb5_data *input,
@@ -68,7 +68,7 @@ krb5_dk_encrypt(const struct krb5_enc_provider *enc,
     blocksize = enc->block_size;
     plainlen = krb5_roundup(blocksize + input->length, blocksize);
 
-    krb5_dk_encrypt_length(enc, hash, input->length, &enclen);
+    krb5int_dk_encrypt_length(enc, hash, input->length, &enclen);
 
     /* key->length, ivec will be tested in enc->encrypt. */
 
@@ -90,13 +90,13 @@ krb5_dk_encrypt(const struct krb5_enc_provider *enc,
 
     d1.data[4] = (char) 0xAA;
 
-    ret = krb5_derive_key(enc, key, &ke, &d1);
+    ret = krb5int_derive_key(enc, key, &ke, &d1);
     if (ret != 0)
        goto cleanup;
 
     d1.data[4] = 0x55;
 
-    ret = krb5_derive_key(enc, key, &ki, &d1);
+    ret = krb5int_derive_key(enc, key, &ki, &d1);
     if (ret != 0)
        goto cleanup;
 
@@ -138,7 +138,7 @@ krb5_dk_encrypt(const struct krb5_enc_provider *enc,
 
     output->length = enclen;
 
-    ret = krb5_hmac(hash, ki, 1, &d1, &d2);
+    ret = krb5int_hmac(hash, ki, 1, &d1, &d2);
     if (ret != 0) {
        memset(d2.data, 0, d2.length);
        goto cleanup;
@@ -188,7 +188,7 @@ trunc_hmac (const struct krb5_hash_provider *hash,
     tmp.data = malloc(hashsize);
     if (tmp.data == NULL)
        return ENOMEM;
-    ret = krb5_hmac(hash, ki, num, input, &tmp);
+    ret = krb5int_hmac(hash, ki, num, input, &tmp);
     if (ret == 0)
        memcpy(output->data, tmp.data, output->length);
     memset(tmp.data, 0, hashsize);
@@ -237,13 +237,13 @@ krb5int_aes_dk_encrypt(const struct krb5_enc_provider *enc,
 
     d1.data[4] = (char) 0xAA;
 
-    ret = krb5_derive_key(enc, key, &ke, &d1);
+    ret = krb5int_derive_key(enc, key, &ke, &d1);
     if (ret != 0)
        goto cleanup;
 
     d1.data[4] = 0x55;
 
-    ret = krb5_derive_key(enc, key, &ki, &d1);
+    ret = krb5int_derive_key(enc, key, &ki, &d1);
     if (ret != 0)
        goto cleanup;
 
index 48b053ad9c1618a601b063e81c10c1102e8cc47d..7589b4b803a253864638fce65869e4c4f994093d 100644 (file)
@@ -41,7 +41,7 @@ krb5int_dk_string_to_key(const struct krb5_enc_provider *enc,
     krb5_keyblock foldkeyblock;
     krb5_key foldkey = NULL;
 
-    /* keyblock->length is checked by krb5_derive_key. */
+    /* keyblock->length is checked by krb5int_derive_key. */
 
     keybytes = enc->keybytes;
     keylength = enc->keylength;
@@ -64,7 +64,7 @@ krb5int_dk_string_to_key(const struct krb5_enc_provider *enc,
     if (salt)
        memcpy(concat + string->length, salt->data, salt->length);
 
-    krb5_nfold(concatlen*8, concat, keybytes*8, foldstring);
+    krb5int_nfold(concatlen*8, concat, keybytes*8, foldstring);
 
     indata.length = keybytes;
     indata.data = (char *) foldstring;
@@ -84,7 +84,7 @@ krb5int_dk_string_to_key(const struct krb5_enc_provider *enc,
     indata.length = kerberos_len;
     indata.data = (char *) kerberos;
 
-    ret = krb5_derive_keyblock(enc, foldkey, keyblock, &indata);
+    ret = krb5int_derive_keyblock(enc, foldkey, keyblock, &indata);
     if (ret != 0)
        memset(keyblock->contents, 0, keyblock->length);
 
index b3abd1835b7f0137763321b8bfadc1c231780fe7..8552c0f16f521e75e50024bc4922bb35b6f6fb28 100644 (file)
    that the keytypes are all near each other.  I'd rather not make
    that assumption. */
 
-const struct krb5_keytypes krb5_enctypes_list[] = {
+const struct krb5_keytypes krb5int_enctypes_list[] = {
     { ENCTYPE_DES_CBC_CRC,
       "des-cbc-crc", { 0 }, "DES cbc mode with CRC-32",
       &krb5int_enc_des, &krb5int_hash_crc32,
       16,
-      krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt,
+      krb5int_old_encrypt_length, krb5int_old_encrypt, krb5int_old_decrypt,
       krb5int_des_string_to_key,
       krb5int_des_prf,
       CKSUMTYPE_RSA_MD5,
@@ -57,7 +57,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "des-cbc-md4", { 0 }, "DES cbc mode with RSA-MD4",
       &krb5int_enc_des, &krb5int_hash_md4,
       16,
-      krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt,
+      krb5int_old_encrypt_length, krb5int_old_encrypt, krb5int_old_decrypt,
       krb5int_des_string_to_key,
       krb5int_des_prf,
       CKSUMTYPE_RSA_MD4,
@@ -67,7 +67,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "des-cbc-md5", { "des" }, "DES cbc mode with RSA-MD5",
       &krb5int_enc_des, &krb5int_hash_md5,
       16,
-      krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt,
+      krb5int_old_encrypt_length, krb5int_old_encrypt, krb5int_old_decrypt,
       krb5int_des_string_to_key,
       krb5int_des_prf,
       CKSUMTYPE_RSA_MD5,
@@ -77,7 +77,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "des-cbc-raw", { 0 }, "DES cbc mode raw",
       &krb5int_enc_des, NULL,
       16,
-      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt,
+      krb5_raw_encrypt_length, krb5int_raw_encrypt, krb5int_raw_decrypt,
       krb5int_des_string_to_key,
       krb5int_des_prf,
       0,
@@ -87,7 +87,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "des3-cbc-raw", { 0 }, "Triple DES cbc mode raw",
       &krb5int_enc_des3, NULL,
       16,
-      krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt,
+      krb5_raw_encrypt_length, krb5int_raw_encrypt, krb5int_raw_decrypt,
       krb5int_dk_string_to_key,
       NULL, /*PRF*/
       0,
@@ -99,7 +99,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "Triple DES cbc mode with HMAC/sha1",
       &krb5int_enc_des3, &krb5int_hash_sha1,
       16,
-      krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt,
+      krb5int_dk_encrypt_length, krb5int_dk_encrypt, krb5int_dk_decrypt,
       krb5int_dk_string_to_key,
       krb5int_dk_prf,
       CKSUMTYPE_HMAC_SHA1_DES3,
@@ -110,7 +110,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       "des-hmac-sha1", { 0 }, "DES with HMAC/sha1",
       &krb5int_enc_des, &krb5int_hash_sha1,
       8,
-      krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt,
+      krb5int_dk_encrypt_length, krb5int_dk_encrypt, krb5int_dk_decrypt,
       krb5int_dk_string_to_key,
       NULL, /*PRF*/
       0,
@@ -122,8 +122,8 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       &krb5int_enc_arcfour,
       &krb5int_hash_md5,
       20,
-      krb5_arcfour_encrypt_length, krb5_arcfour_encrypt,
-      krb5_arcfour_decrypt, krb5int_arcfour_string_to_key,
+      krb5int_arcfour_encrypt_length, krb5int_arcfour_encrypt,
+      krb5int_arcfour_decrypt, krb5int_arcfour_string_to_key,
       krb5int_arcfour_prf, /*PRF*/
       CKSUMTYPE_HMAC_MD5_ARCFOUR,
       &krb5int_aead_arcfour,
@@ -134,8 +134,8 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       &krb5int_enc_arcfour,
       &krb5int_hash_md5,
       20,
-      krb5_arcfour_encrypt_length, krb5_arcfour_encrypt,
-      krb5_arcfour_decrypt, krb5int_arcfour_string_to_key,
+      krb5int_arcfour_encrypt_length, krb5int_arcfour_encrypt,
+      krb5int_arcfour_decrypt, krb5int_arcfour_string_to_key,
       krb5int_arcfour_prf, /*PRF*/
       CKSUMTYPE_HMAC_MD5_ARCFOUR,
       &krb5int_aead_arcfour,
@@ -166,5 +166,5 @@ const struct krb5_keytypes krb5_enctypes_list[] = {
       0 /*flags*/ },
 };
 
-const int krb5_enctypes_length =
-    sizeof(krb5_enctypes_list) / sizeof(struct krb5_keytypes);
+const int krb5int_enctypes_length =
+    sizeof(krb5int_enctypes_list) / sizeof(struct krb5_keytypes);
index edaa00caea389c4a4b880d5e5cd8c32035a526e9..16dbae9cea03947517fccaec370ece91fe4587c5 100644 (file)
@@ -71,20 +71,20 @@ struct krb5_keytypes {
 
 #define ETYPE_WEAK 1
 
-extern const struct krb5_keytypes krb5_enctypes_list[];
-extern const int krb5_enctypes_length;
+extern const struct krb5_keytypes krb5int_enctypes_list[];
+extern const int krb5int_enctypes_length;
 
 static inline const struct krb5_keytypes *
 find_enctype(krb5_enctype enctype)
 {
     int i;
 
-    for (i = 0; i < krb5_enctypes_length; i++) {
-       if (krb5_enctypes_list[i].etype == enctype)
+    for (i = 0; i < krb5int_enctypes_length; i++) {
+       if (krb5int_enctypes_list[i].etype == enctype)
            break;
     }
 
-    if (i == krb5_enctypes_length)
+    if (i == krb5int_enctypes_length)
        return NULL;
-    return &krb5_enctypes_list[i];
+    return &krb5int_enctypes_list[i];
 }
index 2fd239c400469d2206a35d5e10c4c6c643a2d842..48743722a5e1022ef711b5e1167b248222bc3f26 100644 (file)
@@ -50,8 +50,8 @@ krb5_c_keyed_checksum_types(krb5_context context, krb5_enctype enctype,
     *cksumtypes = NULL;
 
     nctypes = 0;
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       ct = &krb5_cksumtypes_list[i];
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       ct = &krb5int_cksumtypes_list[i];
        if ((ct->keyhash && etype_match(ct->keyed_etype, enctype)) ||
            (ct->flags & KRB5_CKSUMFLAG_DERIVE))
            nctypes++;
@@ -62,11 +62,11 @@ krb5_c_keyed_checksum_types(krb5_context context, krb5_enctype enctype,
        return ENOMEM;
 
     c = 0;
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       ct = &krb5_cksumtypes_list[i];
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       ct = &krb5int_cksumtypes_list[i];
        if ((ct->keyhash && etype_match(ct->keyed_etype, enctype)) ||
            (ct->flags & KRB5_CKSUMFLAG_DERIVE))
-           ctypes[c++] = krb5_cksumtypes_list[i].ctype;
+           ctypes[c++] = krb5int_cksumtypes_list[i].ctype;
     }
 
     *count = nctypes;
index 8cf5f1052e159461e0cb47c7125a506a8d37316f..dcf72b5331d01ed0c283e036857e6da40b2abc02 100644 (file)
@@ -33,8 +33,8 @@ krb5_c_is_keyed_cksum(krb5_cksumtype ctype)
     unsigned int i;
     const struct krb5_cksumtypes *ctp;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       ctp = &krb5_cksumtypes_list[i];
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       ctp = &krb5int_cksumtypes_list[i];
        if (ctp->ctype == ctype) {
            return (ctp->keyhash != NULL ||
                    (ctp->flags & KRB5_CKSUMFLAG_DERIVE));
index c1825be6a1d769dee14c19b4ebd2205e68560b7c..8318dc0e7d36581a428e8383db5f89aa15931143 100644 (file)
@@ -57,7 +57,7 @@ k5_hmac_md5_hash (krb5_key key, krb5_keyusage usage,
   ks_constant.data = "signaturekey";
   ks_constant.length = strlen(ks_constant.data)+1; /* Including null*/
 
-  ret = krb5_hmac( &krb5int_hash_md5, key, 1,
+  ret = krb5int_hmac( &krb5int_hash_md5, key, 1,
                   &ks_constant, &ds);
   if (ret)
     goto cleanup;
@@ -68,17 +68,17 @@ k5_hmac_md5_hash (krb5_key key, krb5_keyusage usage,
   if (ret)
       goto cleanup;
 
-  krb5_MD5Init (&ctx);
+  krb5int_MD5Init (&ctx);
   ms_usage = krb5int_arcfour_translate_usage (usage);
   store_32_le(ms_usage, t);
-  krb5_MD5Update (&ctx, (unsigned char * ) &t, 4);
-  krb5_MD5Update (&ctx, (unsigned char *) input-> data,
+  krb5int_MD5Update (&ctx, (unsigned char * ) &t, 4);
+  krb5int_MD5Update (&ctx, (unsigned char *) input-> data,
                  (unsigned int) input->length );
-  krb5_MD5Final(&ctx);
+  krb5int_MD5Final(&ctx);
   md5tmp.data = (void *) ctx.digest;
   md5tmp.length = 16;
 
-  ret = krb5_hmac ( &krb5int_hash_md5, ks, 1, &md5tmp,
+  ret = krb5int_hmac ( &krb5int_hash_md5, ks, 1, &md5tmp,
                    output);
 
     cleanup:
@@ -114,7 +114,7 @@ k5_hmac_md5_hash_iov (krb5_key key, krb5_keyusage usage,
   ks_constant.data = "signaturekey";
   ks_constant.length = strlen(ks_constant.data)+1; /* Including null*/
 
-  ret = krb5_hmac( &krb5int_hash_md5, key, 1,
+  ret = krb5int_hmac( &krb5int_hash_md5, key, 1,
                   &ks_constant, &ds);
   if (ret)
     goto cleanup;
@@ -125,21 +125,21 @@ k5_hmac_md5_hash_iov (krb5_key key, krb5_keyusage usage,
   if (ret)
       goto cleanup;
 
-  krb5_MD5Init (&ctx);
+  krb5int_MD5Init (&ctx);
   ms_usage = krb5int_arcfour_translate_usage (usage);
   store_32_le(ms_usage, t);
-  krb5_MD5Update (&ctx, (unsigned char * ) &t, 4);
+  krb5int_MD5Update (&ctx, (unsigned char * ) &t, 4);
   for (i = 0; i < num_data; i++) {
     const krb5_crypto_iov *iov = &data[i];
 
     if (SIGN_IOV(iov))
-      krb5_MD5Update (&ctx, (unsigned char *)iov->data.data,
+      krb5int_MD5Update (&ctx, (unsigned char *)iov->data.data,
                      (unsigned int)iov->data.length);
   }
-  krb5_MD5Final(&ctx);
+  krb5int_MD5Final(&ctx);
   md5tmp.data = (void *) ctx.digest;
   md5tmp.length = 16;
-  ret = krb5_hmac ( &krb5int_hash_md5, ks, 1, &md5tmp,
+  ret = krb5int_hmac ( &krb5int_hash_md5, ks, 1, &md5tmp,
                    output);
 
     cleanup:
index 1514dccc6775d1b3a917a4f903d17110c06f352e..f3c6d62da46c503f7ae85348cf7091b45082d627 100644 (file)
@@ -32,7 +32,7 @@
 #define CONFLENGTH 8
 
 /* Force acceptance of krb5-beta5 md4des checksum for now. */
-#define KRB5_MD4DES_BETA5_COMPAT
+#define KRB5int_MD4DES_BETA5_COMPAT
 
 /* des-cbc(xorkey, conf | rsa-md4(conf | data)) */
 
@@ -60,11 +60,11 @@ k5_md4des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
 
     /* hash the confounder, then the input data */
 
-    krb5_MD4Init(&ctx);
-    krb5_MD4Update(&ctx, conf, CONFLENGTH);
-    krb5_MD4Update(&ctx, (unsigned char *) input->data,
+    krb5int_MD4Init(&ctx);
+    krb5int_MD4Update(&ctx, conf, CONFLENGTH);
+    krb5int_MD4Update(&ctx, (unsigned char *) input->data,
                   (unsigned int) input->length);
-    krb5_MD4Final(&ctx);
+    krb5int_MD4Final(&ctx);
 
     /* construct the buffer to be encrypted */
 
@@ -92,7 +92,7 @@ k5_md4des_verify(krb5_key key, krb5_keyusage usage,
     if (key->keyblock.length != 8)
        return(KRB5_BAD_KEYSIZE);
     if (hash->length != (CONFLENGTH+RSA_MD4_CKSUM_LENGTH)) {
-#ifdef KRB5_MD4DES_BETA5_COMPAT
+#ifdef KRB5int_MD4DES_BETA5_COMPAT
        if (hash->length != RSA_MD4_CKSUM_LENGTH)
            return(KRB5_CRYPTO_INTERNAL);
        else
@@ -132,13 +132,13 @@ k5_md4des_verify(krb5_key key, krb5_keyusage usage,
 
     /* hash the confounder, then the input data */
 
-    krb5_MD4Init(&ctx);
+    krb5int_MD4Init(&ctx);
     if (!compathash) {
-       krb5_MD4Update(&ctx, plaintext, CONFLENGTH);
+       krb5int_MD4Update(&ctx, plaintext, CONFLENGTH);
     }
-    krb5_MD4Update(&ctx, (unsigned char *) input->data,
+    krb5int_MD4Update(&ctx, (unsigned char *) input->data,
                   (unsigned int) input->length);
-    krb5_MD4Final(&ctx);
+    krb5int_MD4Final(&ctx);
 
     /* compare the decrypted hash to the computed one */
 
index e7a84e2a85dd944097562eca332acca364b98f30..1a2089a02445f8580027beb1a613789bfce52018 100644 (file)
@@ -32,7 +32,7 @@
 #define CONFLENGTH 8
 
 /* Force acceptance of krb5-beta5 md5des checksum for now. */
-#define KRB5_MD5DES_BETA5_COMPAT
+#define KRB5int_MD5DES_BETA5_COMPAT
 
 /* des-cbc(xorkey, conf | rsa-md5(conf | data)) */
 
@@ -60,11 +60,11 @@ k5_md5des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
 
     /* hash the confounder, then the input data */
 
-    krb5_MD5Init(&ctx);
-    krb5_MD5Update(&ctx, conf, CONFLENGTH);
-    krb5_MD5Update(&ctx, (unsigned char *) input->data, 
+    krb5int_MD5Init(&ctx);
+    krb5int_MD5Update(&ctx, conf, CONFLENGTH);
+    krb5int_MD5Update(&ctx, (unsigned char *) input->data,
                   (unsigned int) input->length);
-    krb5_MD5Final(&ctx);
+    krb5int_MD5Final(&ctx);
 
     /* construct the buffer to be encrypted */
 
@@ -93,7 +93,7 @@ k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
        return(KRB5_BAD_KEYSIZE);
 
     if (hash->length != (CONFLENGTH+RSA_MD5_CKSUM_LENGTH)) {
-#ifdef KRB5_MD5DES_BETA5_COMPAT
+#ifdef KRB5int_MD5DES_BETA5_COMPAT
        if (hash->length != RSA_MD5_CKSUM_LENGTH)
            return(KRB5_CRYPTO_INTERNAL);
        else
@@ -132,13 +132,13 @@ k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
 
     /* hash the confounder, then the input data */
 
-    krb5_MD5Init(&ctx);
+    krb5int_MD5Init(&ctx);
     if (!compathash) {
-       krb5_MD5Update(&ctx, plaintext, CONFLENGTH);
+       krb5int_MD5Update(&ctx, plaintext, CONFLENGTH);
     }
-    krb5_MD5Update(&ctx, (unsigned char *) input->data,
+    krb5int_MD5Update(&ctx, (unsigned char *) input->data,
                   (unsigned) input->length);
-    krb5_MD5Final(&ctx);
+    krb5int_MD5Final(&ctx);
 
     /* compare the decrypted hash to the computed one */
 
index 589c3475ed5d9f81d014850fab471816535e5b86..50eb2ecfd38eacca72fa196ed93012bd1713922b 100644 (file)
@@ -42,19 +42,19 @@ k5_md5_hmac_hash (krb5_key key, krb5_keyusage usage,
   unsigned char t[4];
   krb5_data ds;
 
-  krb5_MD5Init(&ctx);
+  krb5int_MD5Init(&ctx);
 
   ms_usage = krb5int_arcfour_translate_usage (usage);
   store_32_le(ms_usage, t);
-  krb5_MD5Update(&ctx, t, sizeof(t));
-  krb5_MD5Update(&ctx, (unsigned char *)input->data, input->length);
-  krb5_MD5Final(&ctx);
+  krb5int_MD5Update(&ctx, t, sizeof(t));
+  krb5int_MD5Update(&ctx, (unsigned char *)input->data, input->length);
+  krb5int_MD5Final(&ctx);
 
   ds.magic = KV5M_DATA;
   ds.length = 16;
   ds.data = (char *)ctx.digest;
 
-  return krb5_hmac ( &krb5int_hash_md5, key, 1, &ds, output);
+  return krb5int_hmac ( &krb5int_hash_md5, key, 1, &ds, output);
 }
 
 const struct krb5_keyhash_provider krb5int_keyhash_md5_hmac = {
index 01e374b14a06e44c59e9adb1024a6da5d15acc3b..def88a18dac4b651f085de6635c42b415f59b564 100644 (file)
@@ -43,13 +43,13 @@ krb5_k_make_checksum(krb5_context context, krb5_cksumtype cksumtype,
     krb5_error_code ret;
     size_t cksumlen;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksumtype)
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksumtype)
            break;
     }
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return KRB5_BAD_ENCTYPE;
-    ctp = &krb5_cksumtypes_list[i];
+    ctp = &krb5int_cksumtypes_list[i];
 
     if (ctp->keyhash != NULL)
        cksumlen = ctp->keyhash->hashsize;
@@ -90,7 +90,7 @@ krb5_k_make_checksum(krb5_context context, krb5_cksumtype cksumtype,
            ret = (*keyhash->hash)(key, usage, 0, input, &data);
        }
     } else if (ctp->flags & KRB5_CKSUMFLAG_DERIVE) {
-       ret = krb5_dk_make_checksum(ctp->hash, key, usage, input, &data);
+       ret = krb5int_dk_make_checksum(ctp->hash, key, usage, input, &data);
     } else {
        /* No key is used. */
        ret = (*ctp->hash->hash)(1, input, &data);
index 32c9a4cb4f19051138859e14dc6b04d9b77a4b7d..e4e2c2d00243129b3765b67cef345988d285f6a5 100644 (file)
@@ -43,13 +43,13 @@ krb5_k_make_checksum_iov(krb5_context context,
     krb5_crypto_iov *checksum;
     const struct krb5_cksumtypes *ctp;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksumtype)
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksumtype)
            break;
     }
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return KRB5_BAD_ENCTYPE;
-    ctp = &krb5_cksumtypes_list[i];
+    ctp = &krb5int_cksumtypes_list[i];
 
     if (ctp->keyhash != NULL)
        cksum_data.length = ctp->keyhash->hashsize;
@@ -69,7 +69,7 @@ krb5_k_make_checksum_iov(krb5_context context,
     if (cksum_data.data == NULL)
        return(ENOMEM);
 
-    ret = krb5int_c_make_checksum_iov(&krb5_cksumtypes_list[i],
+    ret = krb5int_c_make_checksum_iov(&krb5int_cksumtypes_list[i],
                                      key, usage, data, num_data,
                                      &cksum_data);
     if (ret == 0) {
index 1f1902d1cc27a1e19906ba08404ac3e994734ddd..01e897217fe37f1336bff1be270a40b172b53a2b 100644 (file)
@@ -46,7 +46,7 @@ n-fold(k-bits):
 /* input length is in bits */
 
 void
-krb5_nfold(unsigned int inbits, const unsigned char *in, unsigned int outbits,
+krb5int_nfold(unsigned int inbits, const unsigned char *in, unsigned int outbits,
           unsigned char *out)
 {
     int a,b,c,lcm;
index 6cfb0c97ad8fe87520251d66e1fba9ef56df3b1b..a5f3f7889c295c5f1cc87b7035afdc7fd45dbb04 100644 (file)
 
 #include "k5-int.h"
 
-void krb5_old_encrypt_length
+void krb5int_old_encrypt_length
 (const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                size_t input, size_t *length);
 
-krb5_error_code krb5_old_encrypt
+krb5_error_code krb5int_old_encrypt
 (const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
                const krb5_data *ivec, const krb5_data *input,
                krb5_data *output);
 
-krb5_error_code krb5_old_decrypt
+krb5_error_code krb5int_old_decrypt
 (const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
index dd9ad19cb366476d28603f5ef4e068c4e1fb2890..42a755a4a4e530fe4d667d43dbecc54dc7679d59 100644 (file)
@@ -28,7 +28,7 @@
 #include "old.h"
 
 krb5_error_code
-krb5_old_decrypt(const struct krb5_enc_provider *enc,
+krb5int_old_decrypt(const struct krb5_enc_provider *enc,
                 const struct krb5_hash_provider *hash,
                 krb5_key key,
                 krb5_keyusage usage,
index 1121dc935ea5290ba2137d0e16b0a1d1aad1661f..b3a1c5bea8ffc05faddb4a205c518b9647e9f9c5 100644 (file)
@@ -28,7 +28,7 @@
 #include "old.h"
 
 void
-krb5_old_encrypt_length(const struct krb5_enc_provider *enc,
+krb5int_old_encrypt_length(const struct krb5_enc_provider *enc,
                        const struct krb5_hash_provider *hash,
                        size_t inputlen,
                        size_t *length)
@@ -42,7 +42,7 @@ krb5_old_encrypt_length(const struct krb5_enc_provider *enc,
 }
 
 krb5_error_code
-krb5_old_encrypt(const struct krb5_enc_provider *enc,
+krb5int_old_encrypt(const struct krb5_enc_provider *enc,
                 const struct krb5_hash_provider *hash,
                 krb5_key key,
                 krb5_keyusage usage,
@@ -58,7 +58,7 @@ krb5_old_encrypt(const struct krb5_enc_provider *enc,
     blocksize = enc->block_size;
     hashsize = hash->hashsize;
 
-    krb5_old_encrypt_length(enc, hash, input->length, &enclen);
+    krb5int_old_encrypt_length(enc, hash, input->length, &enclen);
 
     if (output->length < enclen)
        return(KRB5_BAD_MSIZE);
index cc203875cb072cd3040cc505fc40a69dae66b61b..379cc1cbe2d5440b2991713eadbca4f4ac791ab9 100644 (file)
@@ -50,7 +50,7 @@ krb5int_dk_prf (const struct krb5_enc_provider *enc,
     return ENOMEM;
   hash->hash(1, in, &tmp);
   tmp.length = (tmp.length/enc->block_size)*enc->block_size; /*truncate to block size*/
-  ret = krb5_derive_key(enc, key, &kp, &prfconst);
+  ret = krb5int_derive_key(enc, key, &kp, &prfconst);
   if (ret == 0)
       ret = enc->encrypt(kp, NULL, &tmp, out);
   krb5_k_free_key(NULL, kp);
index 3affaa5398196b51f5618e96cbad340e7cd5bda7..8a79b553a16b898ddfa6501991f012eabe8d940c 100644 (file)
@@ -35,7 +35,7 @@ krb5int_arcfour_prf(const struct krb5_enc_provider *enc,
                     krb5_key key, const krb5_data *in, krb5_data *out)
 {
     assert(out->length == 20);
-    return krb5_hmac(&krb5int_hash_sha1, key, 1, in, out);
+    return krb5int_hmac(&krb5int_hash_sha1, key, 1, in, out);
 }
 
 
index 84ae73023849581a0b2706250f0a974cc4dbf527..3c26188748280260d83db02177ac33c858685907 100644 (file)
@@ -31,14 +31,14 @@ void krb5_raw_encrypt_length
                const struct krb5_hash_provider *hash,
                size_t input, size_t *length);
 
-krb5_error_code krb5_raw_encrypt
+krb5_error_code krb5int_raw_encrypt
 (const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
                const krb5_data *ivec, const krb5_data *input,
                krb5_data *output);
 
-krb5_error_code krb5_raw_decrypt
+krb5_error_code krb5int_raw_decrypt
 (const struct krb5_enc_provider *enc,
                const struct krb5_hash_provider *hash,
                krb5_key key, krb5_keyusage usage,
index dd62806e4ef6f4f05385d0363250bdb303ce84a4..58ee6f82c822785a6b954219cfaae7ed0d12c9ae 100644 (file)
@@ -28,7 +28,7 @@
 #include "raw.h"
 
 krb5_error_code
-krb5_raw_decrypt(const struct krb5_enc_provider *enc,
+krb5int_raw_decrypt(const struct krb5_enc_provider *enc,
                 const struct krb5_hash_provider *hash,
                 krb5_key key, krb5_keyusage usage,
                 const krb5_data *ivec, const krb5_data *input,
index 462239ee596ea2909215bfc05baa354c13590bae..b02258d4b0bab14af9298819ed8c513d95e43966 100644 (file)
@@ -40,7 +40,7 @@ krb5_raw_encrypt_length(const struct krb5_enc_provider *enc,
 }
 
 krb5_error_code
-krb5_raw_encrypt(const struct krb5_enc_provider *enc,
+krb5int_raw_encrypt(const struct krb5_enc_provider *enc,
                 const struct krb5_hash_provider *hash,
                 krb5_key key, krb5_keyusage usage,
                 const krb5_data *ivec, const krb5_data *input,
index 92ecbfaa1906c6d6e44692f9d07e3e4517b8fedf..796cc2a44660446183b8f25ac3f93fdf22c95d91 100644 (file)
@@ -34,8 +34,8 @@ krb5_string_to_cksumtype(char *string, krb5_cksumtype *cksumtypep)
     const char *alias;
     const struct krb5_cksumtypes *ctp;
 
-    for (i=0; i<krb5_cksumtypes_length; i++) {
-       ctp = &krb5_cksumtypes_list[i];
+    for (i=0; i<krb5int_cksumtypes_length; i++) {
+       ctp = &krb5int_cksumtypes_list[i];
        if (strcasecmp(ctp->name, string) == 0) {
            *cksumtypep = ctp->ctype;
            return 0;
index 141c36c96efb306808d435e785dd14f123ba9a8e..4978ac78573460838ae9014257d7dcbe7d7b9b5c 100644 (file)
@@ -35,8 +35,8 @@ krb5_string_to_enctype(char *string, krb5_enctype *enctypep)
     const char *alias;
     const struct krb5_keytypes *ktp;
 
-    for (i = 0; i < krb5_enctypes_length; i++) {
-       ktp = &krb5_enctypes_list[i];
+    for (i = 0; i < krb5int_enctypes_length; i++) {
+       ktp = &krb5int_enctypes_list[i];
        if (strcasecmp(ktp->name, string) == 0) {
            *enctypep = ktp->etype;
            return 0;
index 56a92df25be5e1b37ecc8eca205ab344642d1530..d32e8f589b8a5d00067a9c54b36afe229e2bb5a5 100644 (file)
@@ -32,8 +32,8 @@ krb5_c_valid_cksumtype(krb5_cksumtype ctype)
 {
     unsigned int i;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == ctype)
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == ctype)
            return TRUE;
     }
 
index b5c61d36018754b7b3afa21adc95198b3383f622..2657fd08481c5e2631b00e4584e913f898e38265 100644 (file)
@@ -40,7 +40,7 @@ valid_enctype(krb5_enctype etype)
 }
 
 krb5_boolean KRB5_CALLCONV
-krb5_c_weak_enctype(krb5_enctype etype)
+krb5int_c_weak_enctype(krb5_enctype etype)
 {
     const struct krb5_keytypes *ktp;
 
index 82f4fb11f1e3993fde7af6f6e6f373a4093db429..d8a9cc8b7a2b001476ceefabc72a678e70e74cb1 100644 (file)
@@ -40,13 +40,13 @@ krb5_k_verify_checksum(krb5_context context, krb5_key key,
     krb5_data indata;
     krb5_checksum computed;
 
-    for (i=0; i<krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == cksum->checksum_type)
+    for (i=0; i<krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == cksum->checksum_type)
            break;
     }
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return KRB5_BAD_ENCTYPE;
-    ctp = &krb5_cksumtypes_list[i];
+    ctp = &krb5int_cksumtypes_list[i];
 
     indata.length = cksum->length;
     indata.data = (char *) cksum->contents;
index f322dc386cd163aa0d662d707d6506e97952d3b9..f72ca652fe96827397db13484e20147883966f98 100644 (file)
@@ -44,13 +44,13 @@ krb5_k_verify_checksum_iov(krb5_context context,
     krb5_data computed;
     krb5_crypto_iov *checksum;
 
-    for (i = 0; i < krb5_cksumtypes_length; i++) {
-       if (krb5_cksumtypes_list[i].ctype == checksum_type)
+    for (i = 0; i < krb5int_cksumtypes_length; i++) {
+       if (krb5int_cksumtypes_list[i].ctype == checksum_type)
            break;
     }
-    if (i == krb5_cksumtypes_length)
+    if (i == krb5int_cksumtypes_length)
        return KRB5_BAD_ENCTYPE;
-    ctp = &krb5_cksumtypes_list[i];
+    ctp = &krb5int_cksumtypes_list[i];
 
     checksum = krb5int_c_locate_iov((krb5_crypto_iov *)data, num_data,
                                    KRB5_CRYPTO_TYPE_CHECKSUM);
@@ -81,7 +81,7 @@ krb5_k_verify_checksum_iov(krb5_context context,
     if (computed.data == NULL)
        return ENOMEM;
 
-    ret = krb5int_c_make_checksum_iov(&krb5_cksumtypes_list[i], key, usage,
+    ret = krb5int_c_make_checksum_iov(&krb5int_cksumtypes_list[i], key, usage,
                                      data, num_data, &computed);
     if (ret) {
        free(computed.data);
index 097886c46f9e2561be2974dba6a84941c27fd7e0..03804c94b265d03a2b5deb228fcc88b3be69279a 100644 (file)
@@ -1,14 +1,14 @@
 is_coll_proof_cksum
 is_keyed_cksum
-krb5_MD4Final
-krb5_MD4Init
-krb5_MD4Update
-krb5_MD5Final
-krb5_MD5Init
-krb5_MD5Update
-krb5_arcfour_decrypt
-krb5_arcfour_encrypt
-krb5_arcfour_encrypt_length
+krb5int_MD4Final
+krb5int_MD4Init
+krb5int_MD4Update
+krb5int_MD5Final
+krb5int_MD5Init
+krb5int_MD5Update
+krb5int_arcfour_decrypt
+krb5int_arcfour_encrypt
+krb5int_arcfour_encrypt_length
 krb5_c_block_size
 krb5_c_fx_cf2_simple
 krb5_c_checksum_length
@@ -43,31 +43,31 @@ krb5_c_valid_cksumtype
 krb5_c_valid_enctype
 krb5_c_verify_checksum
 krb5_c_verify_checksum_iov
-krb5_c_weak_enctype
+krb5int_c_weak_enctype
 krb5_calculate_checksum
 krb5_checksum_size
 krb5_cksumtype_to_string
-krb5_cksumtypes_length
-krb5_cksumtypes_list
+krb5int_cksumtypes_length
+krb5int_cksumtypes_list
 krb5_decrypt
 krb5_decrypt_data
-krb5_derive_key
-krb5_derive_random
-krb5_dk_decrypt
-krb5_dk_encrypt
-krb5_dk_encrypt_length
-krb5_dk_make_checksum
+krb5int_derive_key
+krb5int_derive_random
+krb5int_dk_decrypt
+krb5int_dk_encrypt
+krb5int_dk_encrypt_length
+krb5int_dk_make_checksum
 krb5_eblock_enctype
 krb5_encrypt
 krb5_encrypt_data
 krb5_encrypt_size
 krb5_enctype_to_string
-krb5_enctypes_length
-krb5_enctypes_list
+krb5int_enctypes_length
+krb5int_enctypes_list
 krb5_finish_key
 krb5_finish_random_key
 krb5_free_cksumtypes
-krb5_hmac
+krb5int_hmac
 krb5_init_random_key
 krb5_k_create_key
 krb5_k_decrypt
@@ -81,15 +81,15 @@ krb5_k_make_checksum
 krb5_k_make_checksum_iov
 krb5_k_verify_checksum
 krb5_k_verify_checksum_iov
-krb5_nfold
-krb5_old_decrypt
-krb5_old_encrypt
-krb5_old_encrypt_length
+krb5int_nfold
+krb5int_old_decrypt
+krb5int_old_encrypt
+krb5int_old_encrypt_length
 krb5_process_key
 krb5_random_confounder
 krb5_random_key
-krb5_raw_decrypt
-krb5_raw_encrypt
+krb5int_raw_decrypt
+krb5int_raw_encrypt
 krb5_raw_encrypt_length
 krb5_string_to_cksumtype
 krb5_string_to_enctype
index db6553e25a811a78422c9c025b76071b4957c968..1b088ae8b9f3779cec368ea6a6c3e014f6030377 100644 (file)
@@ -81,7 +81,7 @@ krb5int_aes_string_to_key(const struct krb5_enc_provider *enc,
     if (err)
        goto cleanup;
 
-    err = krb5_derive_keyblock (enc, tempkey, key, &usage);
+    err = krb5int_derive_keyblock (enc, tempkey, key, &usage);
 
 cleanup:
     if (err)
index 719bfaabdfdb79059f5b2295defa65e1d14a6f46..68feb4985413b73b5dc26e29f3d1accd5b3a382f 100644 (file)
@@ -13,7 +13,7 @@ of RSA Data Security)
 const char *const krb5int_arcfour_l40 = "fortybits";
 
 void
-krb5_arcfour_encrypt_length(const struct krb5_enc_provider *enc,
+krb5int_arcfour_encrypt_length(const struct krb5_enc_provider *enc,
                            const struct krb5_hash_provider *hash,
                            size_t inputlen, size_t *length)
 {
@@ -63,7 +63,7 @@ case 7:                               /* tgs-req authenticator */
 
 /* RFC 4757 */ 
 krb5_error_code
-krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
+krb5int_arcfour_encrypt(const struct krb5_enc_provider *enc,
                     const struct krb5_hash_provider *hash,
                     krb5_key key, krb5_keyusage usage,
                     const krb5_data *ivec, const krb5_data *input,
@@ -149,7 +149,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
     salt.length=4;
     store_32_le(ms_usage, salt.data);
   }
-  krb5_hmac(hash, key, 1, &salt, &d1);
+  krb5int_hmac(hash, key, 1, &salt, &d1);
 
   memcpy(k2.contents, k1.contents, k2.length);
 
@@ -193,7 +193,7 @@ krb5_arcfour_encrypt(const struct krb5_enc_provider *enc,
 
 /* This is the arcfour-hmac decryption routine */
 krb5_error_code
-krb5_arcfour_decrypt(const struct krb5_enc_provider *enc,
+krb5int_arcfour_decrypt(const struct krb5_enc_provider *enc,
                     const struct krb5_hash_provider *hash,
                     krb5_key key, krb5_keyusage usage,
                     const krb5_data *ivec, const krb5_data *input,
@@ -276,7 +276,7 @@ krb5_arcfour_decrypt(const struct krb5_enc_provider *enc,
          salt.length = 4;
          store_32_le(ms_usage, salt.data);
       }
-      ret = krb5_hmac(hash, key, 1, &salt, &d1);
+      ret = krb5int_hmac(hash, key, 1, &salt, &d1);
       if (ret)
          goto cleanup;
 
index 1a2876437d96e0e9f98bef92c36b031f9b023380..e00708a7c7d0f97cc2590f17722c88bd72f754a8 100644 (file)
@@ -2,13 +2,13 @@
 #define ARCFOUR_H
 
 extern void
-krb5_arcfour_encrypt_length(const struct krb5_enc_provider *,
+krb5int_arcfour_encrypt_length(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        size_t,
                        size_t *);
 
-extern 
-krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *,
+extern krb5_error_code
+krb5int_arcfour_encrypt(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        krb5_key,
                        krb5_keyusage,
@@ -16,8 +16,8 @@ krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *,
                        const krb5_data *,
                        krb5_data *);
 
-extern 
-krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *,
+extern krb5_error_code
+krb5int_arcfour_decrypt(const struct krb5_enc_provider *,
                        const struct krb5_hash_provider *,
                        krb5_key,
                        krb5_keyusage,
@@ -25,7 +25,8 @@ krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *,
                        const krb5_data *,
                        krb5_data *);
 
-extern krb5_error_code krb5int_arcfour_string_to_key(
+extern krb5_error_code
+krb5int_arcfour_string_to_key(
      const struct krb5_enc_provider *,
      const krb5_data *,
      const krb5_data *,
index 4896afaaf4bb0297350102f368762f5ae369a576..c01fc001b906baaebfc14cd30c23b6d61bd194e1 100644 (file)
@@ -152,7 +152,7 @@ krb5int_arcfour_encrypt_iov(const struct krb5_aead_provider *aead,
        salt.length = 4;
        store_32_le(ms_usage, salt.data);
     }
-    ret = krb5_hmac(hash, key, 1, &salt, &d1);
+    ret = krb5int_hmac(hash, key, 1, &salt, &d1);
     if (ret != 0)
        goto cleanup;
 
@@ -272,7 +272,7 @@ krb5int_arcfour_decrypt_iov(const struct krb5_aead_provider *aead,
        salt.length = 4;
        store_32_le(ms_usage, (unsigned char *)salt.data);
     }
-    ret = krb5_hmac(hash, key, 1, &salt, &d1);
+    ret = krb5int_hmac(hash, key, 1, &salt, &d1);
     if (ret != 0)
        goto cleanup;
 
index 41053ed17da9dfd57b2568a8f0ae7b274fb15b94..09c9b7689bb47ac338f7b8f72c54b4fb9540f484 100644 (file)
@@ -35,9 +35,9 @@ krb5int_arcfour_string_to_key(const struct krb5_enc_provider *enc,
     return err;
 
   /* the actual MD4 hash of the data */
-  krb5_MD4Init(&md4_context);
-  krb5_MD4Update(&md4_context, copystr, copystrlen);
-  krb5_MD4Final(&md4_context);
+  krb5int_MD4Init(&md4_context);
+  krb5int_MD4Update(&md4_context, copystr, copystrlen);
+  krb5int_MD4Final(&md4_context);
   memcpy(key->contents, md4_context.digest, 16);
 
 #if 0  
index f507aaaf7dfafe5b2a80a8396f82a6419b9e9388..3a4a4d5303175ccfd4bb016d50cf6826b77c9bd3 100644 (file)
@@ -38,10 +38,10 @@ k5_md4_hash(unsigned int icount, const krb5_data *input,
     if (output->length != RSA_MD4_CKSUM_LENGTH)
        return(KRB5_CRYPTO_INTERNAL);
 
-    krb5_MD4Init(&ctx);
+    krb5int_MD4Init(&ctx);
     for (i=0; i<icount; i++)
-       krb5_MD4Update(&ctx, (unsigned char *) input[i].data, input[i].length);
-    krb5_MD4Final(&ctx);
+       krb5int_MD4Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5int_MD4Final(&ctx);
 
     memcpy(output->data, ctx.digest, RSA_MD4_CKSUM_LENGTH);
 
index a6e380ae2dc2062f6516dbef9487a6161ae88ce2..10840d0d990b2b4cb34c82185d9f7325b194ab85 100644 (file)
@@ -38,10 +38,10 @@ k5_md5_hash(unsigned int icount, const krb5_data *input,
     if (output->length != RSA_MD5_CKSUM_LENGTH)
        return(KRB5_CRYPTO_INTERNAL);
 
-    krb5_MD5Init(&ctx);
+    krb5int_MD5Init(&ctx);
     for (i=0; i<icount; i++)
-       krb5_MD5Update(&ctx, (unsigned char *) input[i].data, input[i].length);
-    krb5_MD5Final(&ctx);
+       krb5int_MD5Update(&ctx, (unsigned char *) input[i].data, input[i].length);
+    krb5int_MD5Final(&ctx);
 
     memcpy(output->data, ctx.digest, RSA_MD5_CKSUM_LENGTH);
 
index 658bc28f1055ff890fbb4aa9d08de866984410e1..f0734b6cee2540b27111adb41cefcd2a11472621 100644 (file)
@@ -112,7 +112,7 @@ krb5int_hmac_iov_keyblock(const struct krb5_hash_provider *hash,
 }
 
 krb5_error_code
-krb5_hmac(const struct krb5_hash_provider *hash, krb5_key key,
+krb5int_hmac(const struct krb5_hash_provider *hash, krb5_key key,
          unsigned int icount, const krb5_data *input, krb5_data *output)
 {
     return krb5int_hmac_keyblock(hash, &key->keyblock, icount, input, output);
index 88d5191882d29b314285bf09322324e19000d62a..88f5e3616d765c1b81ba96460b23792bc8fd1461 100644 (file)
@@ -8,20 +8,20 @@
 #include <openssl/md4.h>
 
 void
-krb5_MD4Init (krb5_MD4_CTX *mdContext)
+krb5int_MD4Init (krb5_MD4_CTX *mdContext)
 {
     EVP_MD_CTX_init(&mdContext->ossl_md4_ctx );
     EVP_DigestInit_ex(&mdContext->ossl_md4_ctx, EVP_md4(), NULL);
 
 }
 void
-krb5_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
+krb5int_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
     EVP_DigestUpdate(&mdContext->ossl_md4_ctx, inBuf, inLen);
 }
 
 void
-krb5_MD4Final (krb5_MD4_CTX *mdContext)
+krb5int_MD4Final (krb5_MD4_CTX *mdContext)
 {
     EVP_DigestFinal_ex(&mdContext->ossl_md4_ctx, mdContext->digest , NULL);
     EVP_MD_CTX_cleanup(&mdContext->ossl_md4_ctx );
index 4b0204727609f1bf0799e01174e22038c5e694f1..ec4e0458fe5956e862ff12d2bf6ff77856d09c7b 100644 (file)
@@ -87,9 +87,9 @@ typedef struct {
     unsigned char digest[16];    /* actual digest after MD4Final call */
 } krb5_MD4_CTX;
 
-extern void krb5_MD4Init(krb5_MD4_CTX *);
-extern void krb5_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int);
-extern void krb5_MD4Final(krb5_MD4_CTX *);
+extern void krb5int_MD4Init(krb5_MD4_CTX *);
+extern void krb5int_MD4Update(krb5_MD4_CTX *, const unsigned char *, unsigned int);
+extern void krb5int_MD4Final(krb5_MD4_CTX *);
 
 /*
  **********************************************************************
index 8519dd535eb43e81c2527409f51c7f2bc3f6424e..2a725dc58c473a04941be498489ca80ff317cec0 100644 (file)
@@ -4,31 +4,31 @@
 #include <openssl/evp.h>
 #include <openssl/md5.h>
 
-/* The routine krb5_MD5Init initializes the message-digest context
+/* The routine krb5int_MD5Init initializes the message-digest context
    mdContext. All fields are set to zero.
  */
 void 
-krb5_MD5Init (krb5_MD5_CTX *mdContext)
+krb5int_MD5Init (krb5_MD5_CTX *mdContext)
 {
     EVP_MD_CTX_init(&mdContext->ossl_md5_ctx);
     EVP_DigestInit_ex(&mdContext->ossl_md5_ctx, EVP_md5(), NULL);
 }
 
-/* The routine krb5_MD5Update updates the message-digest context to
+/* The routine krb5int_MD5Update updates the message-digest context to
    account for the presence of each of the characters inBuf[0..inLen-1]
    in the message whose digest is being computed.
  */
 void
-krb5_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
+krb5int_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
     EVP_DigestUpdate(&mdContext->ossl_md5_ctx, inBuf, inLen);
 }
 
-/* The routine krb5_MD5Final terminates the message-digest computation and
+/* The routine krb5int_MD5Final terminates the message-digest computation and
    ends with the desired message digest in mdContext->digest[0...15].
  */
 void
-krb5_MD5Final (krb5_MD5_CTX *mdContext)
+krb5int_MD5Final (krb5_MD5_CTX *mdContext)
 {
     EVP_DigestFinal_ex(&mdContext->ossl_md5_ctx, mdContext->digest, NULL);
     EVP_MD_CTX_cleanup(&mdContext->ossl_md5_ctx);
index 7240b20ca0eeeb7242efd37796c69c5c5b527dbc..3142f6b7640be8f8e2f6dd059335b4180bb620e2 100644 (file)
@@ -15,9 +15,9 @@ typedef struct {
     unsigned char digest[16];    /* actual digest after MD5Final call */
 } krb5_MD5_CTX;
 
-extern void krb5_MD5Init(krb5_MD5_CTX *);
-extern void krb5_MD5Update(krb5_MD5_CTX *,const unsigned char *,unsigned int);
-extern void krb5_MD5Final(krb5_MD5_CTX *);
+extern void krb5int_MD5Init(krb5_MD5_CTX *);
+extern void krb5int_MD5Update(krb5_MD5_CTX *,const unsigned char *,unsigned int);
+extern void krb5int_MD5Final(krb5_MD5_CTX *);
 
 #define    RSA_MD5_CKSUM_LENGTH            16
 #define    OLD_RSA_MD5_DES_CKSUM_LENGTH    16
index 8afd603d2183976d24ac43b5a482900222fa94e0..0f712ea4668c6a973e3dff87638c145b182abb67 100644 (file)
@@ -321,7 +321,7 @@ kg_arcfour_docrypt(const krb5_keyblock *longterm_key , int ms_usage,
     input.length = i;
     output.data = (void *) usage_key.contents;
     output.length = usage_key.length;
-    code = (*kaccess.krb5_hmac) (kaccess.md5_hash_provider,
+    code = (*kaccess.krb5int_hmac) (kaccess.md5_hash_provider,
                                  longterm_key, 1, &input, &output);
     if (code)
         goto cleanup_arcfour;
@@ -331,7 +331,7 @@ kg_arcfour_docrypt(const krb5_keyblock *longterm_key , int ms_usage,
     input.data = ( void *) kd_data;
     input.length = kd_data_len;
     output.data = (void *) seq_enc_key.contents;
-    code = (*kaccess.krb5_hmac) (kaccess.md5_hash_provider,
+    code = (*kaccess.krb5int_hmac) (kaccess.md5_hash_provider,
                                  &usage_key, 1, &input, &output);
     if (code)
         goto cleanup_arcfour;
@@ -667,7 +667,7 @@ kg_arcfour_docrypt_iov(krb5_context context,
     input.length = i;
     output.data = (void *) usage_key.contents;
     output.length = usage_key.length;
-    code = (*kaccess.krb5_hmac) (kaccess.md5_hash_provider,
+    code = (*kaccess.krb5int_hmac) (kaccess.md5_hash_provider,
                                  longterm_key, 1, &input, &output);
     if (code)
         goto cleanup_arcfour;
@@ -677,7 +677,7 @@ kg_arcfour_docrypt_iov(krb5_context context,
     input.data = ( void *) kd_data;
     input.length = kd_data_len;
     output.data = (void *) seq_enc_key.contents;
-    code = (*kaccess.krb5_hmac) (kaccess.md5_hash_provider,
+    code = (*kaccess.krb5int_hmac) (kaccess.md5_hash_provider,
                                  &usage_key, 1, &input, &output);
     if (code)
         goto cleanup_arcfour;
index 2545be39611e3b927242ab08b8dda8e76518e7f7..ea78e0da7c88e8945f4900dc879e599b0b3ba966 100644 (file)
@@ -309,7 +309,7 @@ set_default_etype_var(krb5_context context, const krb5_enctype *etypes,
        for (i = 0; etypes[i]; i++) {
            if (!krb5_c_valid_enctype(etypes[i]))
                return KRB5_PROG_ETYPE_NOSUPP;
-           if (!context->allow_weak_crypto && krb5_c_weak_enctype(etypes[i]))
+           if (!context->allow_weak_crypto && krb5int_c_weak_enctype(etypes[i]))
                return KRB5_PROG_ETYPE_NOSUPP;
        }
 
@@ -357,7 +357,7 @@ mod_list(krb5_enctype etype, krb5_boolean add, krb5_boolean allow_weak,
     unsigned int i;
 
     assert(etype > 0 && etype <= MAX_ENCTYPE);
-    if (!allow_weak && krb5_c_weak_enctype(etype))
+    if (!allow_weak && krb5int_c_weak_enctype(etype))
        return;
     for (i = 0; i < *count; i++) {
        if (list[i] == etype) {
index 5575687dd43cf27aafd7b8fa25f57a7060013673..6df7e1100aa678065f8f833f3c2de41dabf63a3a 100644 (file)
@@ -52,7 +52,7 @@ krb5int_accessor(krb5int_access *internals, krb5_int32 version)
            krb5int_access internals_temp;
 #endif
            S (free_addrlist, krb5int_free_addrlist),
-           S (krb5_hmac, krb5int_hmac_keyblock),
+           S (krb5int_hmac, krb5int_hmac_keyblock),
            S (krb5_auth_con_get_subkey_enctype, krb5_auth_con_get_subkey_enctype),
            S (md5_hash_provider, &krb5int_hash_md5),
            S (arcfour_enc_provider, &krb5int_enc_arcfour),
index 78b5866185ce491887887f7a8a04ae8d8f7fa4a4..7a0bffe07e08332b8cb3da535df1350b901f0592 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
        exit(1);
     }
 
-    krb5_nfold(inlen,instr,outlen,outstr);
+    krb5int_nfold(inlen,instr,outlen,outstr);
 
     printf("%d-fold(",outlen);
     for (i=0; i<(inlen/8); i++)