KEYS: asymmetric: Fix build errors as symbol undefined

Message ID 20221115100512.20147-1-hucool.lihua@huawei.com
State New
Headers
Series KEYS: asymmetric: Fix build errors as symbol undefined |

Commit Message

Lihua (lihua, ran) Nov. 15, 2022, 10:05 a.m. UTC
  pkcs7_supply_detached_data is called by x509_key_parser module, but not exported:
    ERROR: modpost: "pkcs7_supply_detached_data" [crypto/asymmetric_keys/x509_key_parser.ko] undefined!

Fixes: cfc411e7fff3 ("Move certificate handling to its own directory")
Signed-off-by: Li Hua <hucool.lihua@huawei.com>
---
 crypto/asymmetric_keys/pkcs7_verify.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Lihua (lihua, ran) Nov. 19, 2022, 5:20 a.m. UTC | #1
ping

在 2022/11/15 18:05, Li Hua 写道:
> pkcs7_supply_detached_data is called by x509_key_parser module, but not exported:
>      ERROR: modpost: "pkcs7_supply_detached_data" [crypto/asymmetric_keys/x509_key_parser.ko] undefined!
> 
> Fixes: cfc411e7fff3 ("Move certificate handling to its own directory")
> Signed-off-by: Li Hua <hucool.lihua@huawei.com>
> ---
>   crypto/asymmetric_keys/pkcs7_verify.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
> index f6321c785714..4fa769c4bcdb 100644
> --- a/crypto/asymmetric_keys/pkcs7_verify.c
> +++ b/crypto/asymmetric_keys/pkcs7_verify.c
> @@ -485,3 +485,4 @@ int pkcs7_supply_detached_data(struct pkcs7_message *pkcs7,
>   	pkcs7->data_len = datalen;
>   	return 0;
>   }
> +EXPORT_SYMBOL_GPL(pkcs7_supply_detached_data);
>
  

Patch

diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
index f6321c785714..4fa769c4bcdb 100644
--- a/crypto/asymmetric_keys/pkcs7_verify.c
+++ b/crypto/asymmetric_keys/pkcs7_verify.c
@@ -485,3 +485,4 @@  int pkcs7_supply_detached_data(struct pkcs7_message *pkcs7,
 	pkcs7->data_len = datalen;
 	return 0;
 }
+EXPORT_SYMBOL_GPL(pkcs7_supply_detached_data);