libceph: fix auth_signature buffer allocation in secure mode
[linux-2.6-microblaze.git] / net / ceph / messenger_v2.c
index 5e38c84..4f938fc 100644 (file)
@@ -10,7 +10,7 @@
 #include <crypto/aead.h>
 #include <crypto/algapi.h>  /* for crypto_memneq() */
 #include <crypto/hash.h>
-#include <crypto/sha.h>
+#include <crypto/sha2.h>
 #include <linux/bvec.h>
 #include <linux/crc32c.h>
 #include <linux/net.h>
@@ -1333,7 +1333,8 @@ static int prepare_auth_signature(struct ceph_connection *con)
        void *buf;
        int ret;
 
-       buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE, false));
+       buf = alloc_conn_buf(con, head_onwire_len(SHA256_DIGEST_SIZE,
+                                                 con_secure(con)));
        if (!buf)
                return -ENOMEM;