Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-12-18 15:18:42 +0100
committerMichal Suchanek <msuchanek@suse.de>2019-12-18 15:22:59 +0100
commit353586249d5f535755593fb4aff04491b3425b83 (patch)
tree7d0ccd857e351cf00051b9dee8f9af28d85fce0b
parent1dfced007ca5af935cc5772e5985fb7118396f9a (diff)
Refresh patches.kabi/kABI-add-_q-suffix-to-exports-that-take-struct-dh.patch.
Adjust for change of DH_KPP_SECRET_MIN_SIZE in 35f7d5225ffcbf1b759f641aec1735e3a89b1914 suse-commit: a30af001ad0d4a7d632d94946f704ea84d53e8ac
-rw-r--r--crypto/dh_helper.c4
-rw-r--r--include/crypto/dh.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c
index 939f69330fbf..d50aac2faa15 100644
--- a/crypto/dh_helper.c
+++ b/crypto/dh_helper.c
@@ -125,6 +125,8 @@ EXPORT_SYMBOL_GPL(crypto_dh_decode_key);
#undef crypto_dh_encode_key
#undef crypto_dh_decode_key
+#define DH_KPP_SECRET_MIN_SIZE_NO_Q (sizeof(struct kpp_secret) + 3 * sizeof(int))
+
static inline int dh_data_size_no_q(const struct dh *p)
{
return p->key_size + p->p_size + p->g_size;
@@ -132,7 +134,7 @@ static inline int dh_data_size_no_q(const struct dh *p)
int crypto_dh_key_len(const struct dh *p)
{
- return DH_KPP_SECRET_MIN_SIZE + dh_data_size_no_q(p);
+ return DH_KPP_SECRET_MIN_SIZE_NO_Q + dh_data_size_no_q(p);
}
EXPORT_SYMBOL_GPL(crypto_dh_key_len);
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index d947dafd3b54..b6b269878b57 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -33,10 +33,10 @@ struct dh {
};
/* kABI we added the q parameter to struct dh so interface of these functions changed. */
+#define dh dh_q
#define crypto_dh_key_len crypto_dh_key_len_q
#define crypto_dh_encode_key crypto_dh_encode_key_q
#define crypto_dh_decode_key crypto_dh_decode_key_q
-#define dh dh_q
/**
* DOC: DH Helper Functions