diff mbox series

[1/5] crypto: Add swupdate_pkcs11.h

Message ID 20251219112215.103862-2-bage@debian.org
State Accepted
Headers show
Series pkcs11 decrypt provider based on p11-kit | expand

Commit Message

Bastian Germann Dec. 19, 2025, 11:21 a.m. UTC
Add a header importing p11-kit stuff that is used for another PKCS#11
implementation.

Signed-off-by: Bastian Germann <bage@debian.org>
---
 crypto/swupdate_pkcs11.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 crypto/swupdate_pkcs11.h

Comments

Stefano Babic Jan. 11, 2026, 10:07 a.m. UTC | #1
On 12/19/25 12:21, Bastian Germann wrote:
> Add a header importing p11-kit stuff that is used for another PKCS#11
> implementation.
> 
> Signed-off-by: Bastian Germann <bage@debian.org>
> ---
>   crypto/swupdate_pkcs11.h | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>   create mode 100644 crypto/swupdate_pkcs11.h
> 
> diff --git a/crypto/swupdate_pkcs11.h b/crypto/swupdate_pkcs11.h
> new file mode 100644
> index 00000000..5658dc88
> --- /dev/null
> +++ b/crypto/swupdate_pkcs11.h
> @@ -0,0 +1,22 @@
> +/*
> + * (C) Copyright 2025
> + * Bastian Germann
> + *
> + * SPDX-License-Identifier:     GPL-2.0-only
> + */
> +
> +#pragma once
> +
> +#include <p11-kit/uri.h>
> +#include <p11-kit/p11-kit.h>
> +
> +#include "util.h"
> +
> +struct pkcs11_digest {
> +	P11KitUri *uri;
> +	CK_FUNCTION_LIST_PTR module;
> +	CK_SESSION_HANDLE session;
> +	CK_MECHANISM mechanism;
> +	CK_BYTE iv[AES_BLK_SIZE];
> +	CK_BYTE last[AES_BLK_SIZE + 1];
> +};
> 

Reviewed-by: Stefano Babic <stefano.babic@swupdate.org>
diff mbox series

Patch

diff --git a/crypto/swupdate_pkcs11.h b/crypto/swupdate_pkcs11.h
new file mode 100644
index 00000000..5658dc88
--- /dev/null
+++ b/crypto/swupdate_pkcs11.h
@@ -0,0 +1,22 @@ 
+/*
+ * (C) Copyright 2025
+ * Bastian Germann
+ *
+ * SPDX-License-Identifier:     GPL-2.0-only
+ */
+
+#pragma once
+
+#include <p11-kit/uri.h>
+#include <p11-kit/p11-kit.h>
+
+#include "util.h"
+
+struct pkcs11_digest {
+	P11KitUri *uri;
+	CK_FUNCTION_LIST_PTR module;
+	CK_SESSION_HANDLE session;
+	CK_MECHANISM mechanism;
+	CK_BYTE iv[AES_BLK_SIZE];
+	CK_BYTE last[AES_BLK_SIZE + 1];
+};