mirror of
				https://github.com/nextepc/nextepc-oss.git
				synced 2025-11-04 05:43:13 +00:00 
			
		
		
		
	o Generate the private key as below.
   $ openssl genpkey -algorithm X25519 -out /etc/open5gs/hnet/curve25519-1.key
   $ openssl ecparam -name prime256v1 -genkey -conv_form compressed -out /etc/open5gs/hnet/secp256r1-2.key
 o The private and public keys can be viewed with the command.
   The public key is used when creating the SIM.
   $ openssl pkey -in /etc/open5gs/hnet/curve25519-1.key -text
   $ openssl ec -in /etc/open5gs/hnet/secp256r1-2.key -conv_form compressed -text
In ausf/udm.yaml
 hnet:
    o Home network public key identifier(PKI) value : 1
      Protection scheme identifier : ECIES scheme profile A
    - id: 1
      scheme: 1
      key: /etc/open5gs/hnet/curve25519-1.key
    o Home network public key identifier(PKI) value : 2
      Protection scheme identifier : ECIES scheme profile B
    - id: 2
      scheme: 2
      key: /etc/open5gs/hnet/secp256r1-2.key
    o Home network public key identifier(PKI) value : 3
      Protection scheme identifier : ECIES scheme profile A
    - id: 3
      scheme: 1
      key: /etc/open5gs/hnet/curve25519-1.key
    o Home network public key identifier(PKI) value : 4
      Protection scheme identifier : ECIES scheme profile B
    - id: 4
      scheme: 2
      key: /etc/open5gs/hnet/secp256r1-2.key
Related to #1779
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
ANALYZE_TOOL="${1}" && shift
 | 
						|
BUILD_DIR="${1}" && shift
 | 
						|
SOURCES_DIR="${1}" && shift
 | 
						|
 | 
						|
SOURCES=$(find ${SOURCES_DIR}/src ${SOURCES_DIR}/lib -not -path *asn1c* -not -path *ipfw* -name *.c)
 | 
						|
#SOURCES=$(find ${SOURCES_DIR}/src ${SOURCES_DIR}/lib ${SOURCES_DIR}/subprojects -name *.c)
 | 
						|
 | 
						|
if [[ ${ANALYZE_TOOL} == *"clang-tidy"* ]];
 | 
						|
then
 | 
						|
    if [[ ${ANALYZE_TOOL} == *"run-clang-tidy"* ]]; then
 | 
						|
        OPTS="${OPTS} -j $(nproc)"
 | 
						|
    fi
 | 
						|
 | 
						|
    OPTS="${OPTS} -quiet"
 | 
						|
    OPTS="${OPTS} -p=${BUILD_DIR}"
 | 
						|
 | 
						|
    ${ANALYZE_TOOL} ${OPTS} ${SOURCES} 2>/dev/null
 | 
						|
 | 
						|
elif [[ ${ANALYZE_TOOL} == *"cppcheck"* ]];
 | 
						|
then
 | 
						|
    OPTS="${OPTS} -j $(nproc)"
 | 
						|
#    OPTS="${OPTS} --quiet"
 | 
						|
    OPTS="${OPTS} --verbose"
 | 
						|
    OPTS="${OPTS} --enable=all"
 | 
						|
    OPTS="${OPTS} --verbose"
 | 
						|
    OPTS="${OPTS} --suppress=variableScope"
 | 
						|
    OPTS="${OPTS} --suppress=preprocessorErrorDirective"
 | 
						|
    OPTS="${OPTS} --suppress=unusedVariable"
 | 
						|
    OPTS="${OPTS} --output-file=cppchecklog.log"
 | 
						|
    OPTS="${OPTS} --cppcheck-build-dir=${BUILD_DIR}/cppcheck"
 | 
						|
    OPTS="${OPTS} --project=${BUILD_DIR}/compile_commands.json"
 | 
						|
 | 
						|
    ${ANALYZE_TOOL} ${OPTS} ${SOURCES}
 | 
						|
 | 
						|
else
 | 
						|
    echo "Unknown static code analysis tool: ${ANALYZE_TOOL}"
 | 
						|
    exit 1
 | 
						|
fi
 |