mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
package/parsec: new package
Hardware/platform abstraction service for TPMs, HSMs, and Root of Trust https://github.com/parallaxsecond/parsec.git Signed-off-by: Saeed Kazemi <kazemi.ms@gmail.com> [Julien: add upstream patch to fix build] Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
717f1fdaeb
commit
04a5fa5ff7
@@ -2907,6 +2907,7 @@ F: package/biosdevname/
|
||||
N: Saeed Kazemi <kazemi.ms@gmail.com>
|
||||
F: package/eza/
|
||||
F: package/fd/
|
||||
F: package/parsec/
|
||||
F: package/parsec-tool/
|
||||
F: package/procs/
|
||||
F: package/mxt-app/
|
||||
|
||||
@@ -1624,6 +1624,7 @@ menu "Crypto"
|
||||
source "package/nettle/Config.in"
|
||||
source "package/oath-toolkit/Config.in"
|
||||
source "package/openssl/Config.in"
|
||||
source "package/parsec/Config.in"
|
||||
source "package/parsec-tool/Config.in"
|
||||
source "package/pkcs11-helper/Config.in"
|
||||
source "package/rhash/Config.in"
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From b76bebf839169fc831712b8a80db1e6ff7535dfd Mon Sep 17 00:00:00 2001
|
||||
From: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
|
||||
Date: Thu, 29 Aug 2024 17:10:06 +0100
|
||||
Subject: [PATCH] Fix unnecessary qualifications error
|
||||
|
||||
Upstream: https://github.com/parallaxsecond/parsec/commit/86d4d2ca2f1e873a29f9f4d4bba99fedee19a144
|
||||
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
|
||||
Signed-off-by: Julien Olivain <ju.o@free.fr>
|
||||
---
|
||||
src/front/domain_socket.rs | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/front/domain_socket.rs b/src/front/domain_socket.rs
|
||||
index 9fb8a0c..a0effa5 100644
|
||||
--- a/src/front/domain_socket.rs
|
||||
+++ b/src/front/domain_socket.rs
|
||||
@@ -239,15 +239,16 @@ pub mod peer_credentials {
|
||||
pub mod impl_linux {
|
||||
use super::UCred;
|
||||
use libc::{c_void, getsockopt, socklen_t, ucred, SOL_SOCKET, SO_PEERCRED};
|
||||
+ use std::io;
|
||||
+ use std::mem::size_of;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::unix::net::UnixStream;
|
||||
- use std::{io, mem};
|
||||
|
||||
pub fn peer_cred(socket: &UnixStream) -> io::Result<UCred> {
|
||||
- let ucred_size = mem::size_of::<ucred>();
|
||||
+ let ucred_size = size_of::<ucred>();
|
||||
|
||||
// Trivial sanity checks.
|
||||
- assert!(mem::size_of::<u32>() <= mem::size_of::<usize>());
|
||||
+ assert!(size_of::<u32>() <= size_of::<usize>());
|
||||
assert!(ucred_size <= u32::MAX as usize);
|
||||
|
||||
let mut ucred_size = ucred_size as socklen_t;
|
||||
@@ -266,7 +267,7 @@ pub mod peer_credentials {
|
||||
&mut ucred_size,
|
||||
);
|
||||
|
||||
- if ret == 0 && ucred_size as usize == mem::size_of::<ucred>() {
|
||||
+ if ret == 0 && ucred_size as usize == size_of::<ucred>() {
|
||||
Ok(UCred {
|
||||
uid: ucred.uid,
|
||||
gid: ucred.gid,
|
||||
--
|
||||
2.47.1
|
||||
|
||||
15
package/parsec/Config.in
Normal file
15
package/parsec/Config.in
Normal file
@@ -0,0 +1,15 @@
|
||||
config BR2_PACKAGE_PARSEC
|
||||
bool "parsec"
|
||||
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
|
||||
select BR2_PACKAGE_HOST_RUSTC
|
||||
help
|
||||
Hardware/platform abstraction service for TPMs, HSMs, and
|
||||
Root of Trust
|
||||
PARSEC is the Platform AbstRaction for SECurity, an
|
||||
open-source initiative to provide a common API to hardware
|
||||
security and cryptographic services in a platform-agnostic
|
||||
way. This abstraction layer keeps workloads decoupled from
|
||||
physical platform details, enabling cloud-native delivery
|
||||
flows within the data center and at the edge.
|
||||
|
||||
https://github.com/parallaxsecond/parsec.git
|
||||
3
package/parsec/parsec.hash
Normal file
3
package/parsec/parsec.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 0b69c30c7e40c65e3c74450e0baf1e3f821ffa624a6dc7aa49f5aa976c42fda0 parsec-1.4.1-cargo2.tar.gz
|
||||
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
|
||||
12
package/parsec/parsec.mk
Normal file
12
package/parsec/parsec.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
################################################################################
|
||||
#
|
||||
# parsec
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PARSEC_VERSION = 1.4.1
|
||||
PARSEC_SITE = $(call github,parallaxsecond,parsec,$(PARSEC_VERSION))
|
||||
PARSEC_LICENSE = Apache-2.0
|
||||
PARSEC_LICENSE_FILES = LICENSE
|
||||
|
||||
$(eval $(cargo-package))
|
||||
Reference in New Issue
Block a user