Revert "krb5_wrap: Add MIT implmentation of smb_krb5_keyblock_init_contents()"
authorAndreas Schneider <asn@samba.org>
Fri, 2 Sep 2016 08:53:41 +0000 (10:53 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 8 Sep 2016 22:32:12 +0000 (00:32 +0200)
This reverts commit c0e861666911d84f2d78cdab370077d9ac192005.

The krb5_init_keyblock function from MIT allocates the key but we
operate only on the contents.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/krb5_wrap/krb5_samba.c

index 841e3f84312cff0efd2fa65929d3cf3538985bc6..dcd6185db9fab36dd2decb6c81cf997f9ce55cd6 100644 (file)
@@ -1638,22 +1638,6 @@ krb5_error_code smb_krb5_keyblock_init_contents(krb5_context context,
 {
 #if defined(HAVE_KRB5_KEYBLOCK_INIT)
        return krb5_keyblock_init(context, enctype, data, length, key);
-#elif defined(HAVE_KRB5_INIT_KEYBLOCK)
-       krb5_error_code code;
-
-       code = krb5_init_keyblock(context,
-                                 enctype,
-                                 length,
-                                 key);
-       if (code != 0) {
-               return code;
-       }
-
-       if (length != 0) {
-               memcpy(KRB5_KEY_DATA(key), data, length);
-       }
-
-       return 0;
 #else
        memset(key, 0, sizeof(krb5_keyblock));
        KRB5_KEY_DATA(key) = SMB_MALLOC(length);