server

package
v0.0.0-...-9b07614 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MulanPSL-2.0 Imports: 31 Imported by: 0

Documentation

Overview

clientapi package implements the grpc communication between rac and ras.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptKeyOpIncome

func DecryptKeyOpIncome(encCmdData, privKey []byte) (*inKeyInfo, error)

DecryptKeyOpIncome firstly decrypt encrypted session key with kcm privatekey, and then uses session key to decrypt encrypted data, retrurns decrypted data.

func EncryptKeyOpOutcome

func EncryptKeyOpOutcome(retMessage retKeyInfo, sessionKey, KtaPublickeyCert []byte) ([]byte, error)

EncryptKeyOpOutcome firstly encrypt data with sesionkey, and then uses kta public key to encrypt sessionkey with kta public key, retrurns encrypted data and encrypted sessionkey.

func GetdbConfig

func GetdbConfig(strDbConfig string) string

GetdbConfig returns db config information.

func RsaDecrypt

func RsaDecrypt(ciphertext, keyBytes []byte) ([]byte, error)

RsaDecrypt is based on rsa algorithm using the key to decrypt ciphertext.

func RsaEncrypt

func RsaEncrypt(data, keyBytes []byte) ([]byte, error)

RsaEncrypt is based on rsa algorithm using the key to encrypt data.

func StartServer

func StartServer(addr string)

StartServer starts a server to provide ras rpc services.

func StopServer

func StopServer()

StopServer stops the server and trust manager, release all resources.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL