backupkey

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Syntax UUID
	BackupKeySyntaxUUID = &uuid.UUID{TimeLow: 0x3dde7c30, TimeMid: 0x165d, TimeHiAndVersion: 0x11d1, ClockSeqHiAndReserved: 0xab, ClockSeqLow: 0x8f, Node: [6]uint8{0x0, 0x80, 0x5f, 0x14, 0xdb, 0x40}}
	// Syntax ID
	BackupKeySyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: BackupKeySyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)
View Source
var (
	// import guard
	GoPackage = "bkrp"
)

Functions

func BackupKeyServerHandle

func BackupKeyServerHandle(ctx context.Context, o BackupKeyServer, opNum int, r ndr.Reader) (dcerpc.Operation, error)

func NewBackupKeyServerHandle

func NewBackupKeyServerHandle(o BackupKeyServer) dcerpc.ServerHandle

func RegisterBackupKeyServer

func RegisterBackupKeyServer(conn dcerpc.Conn, o BackupKeyServer, opts ...dcerpc.Option)

Types

type BackupKeyClient

type BackupKeyClient interface {

	// This section specifies the BackuprKey method.
	//
	// Return Values: The server MUST return 0 if it successfully processes the message
	// received from the client, and a nonzero value otherwise.
	//
	// Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying
	// RPC protocol [MS-RPCE].
	BackupKey(context.Context, *BackupKeyRequest, ...dcerpc.CallOption) (*BackupKeyResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error
}

BackupKey interface.

func NewBackupKeyClient

func NewBackupKeyClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (BackupKeyClient, error)

type BackupKeyRequest

type BackupKeyRequest struct {
	// pguidActionAgent: A GUID RPC structure, as specified in [MS-DTYP] section 2.3.4.
	// This MUST be set to one of the following values. The BACKUPKEY_BACKUP_GUID and BACKUPKEY_RESTORE_GUID_WIN2K
	// values indicate the ServerWrap subprotocol, while the BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID
	// and BACKUPKEY_RESTORE_GUID values indicate the ClientWrap subprotocol. A server MUST
	// support at least one of these subprotocols completely, and all server implementations
	// SHOULD support all four values. In addition, if a server supports the wrapping operation
	// of either subprotocol, it MUST also support the corresponding unwrap operation. Thus,
	// if a server supports BACKUPKEY_BACKUP_GUID, then it MUST also support BACKUPKEY_RESTORE_GUID_WIN2K.
	// Similarly, if a server supports BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID, it MUST also
	// support BACKUPKEY_RESTORE_GUID.<9>
	//
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	|                                                                         |                                                                                  |
	//	|                                  VALUE                                  |                                     MEANING                                      |
	//	|                                                                         |                                                                                  |
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	| BACKUPKEY_BACKUP_GUID 7F752B10-178E-11D1-AB8F-00805F14DB40              | Requests server-side wrapping. On input, pDataIn MUST point to a BLOB containing |
	//	|                                                                         | the secret to be wrapped. The server MUST treat pDataIn as opaque binary data.   |
	//	|                                                                         | On output, ppDataOut MUST contain the wrapped secret in the format specified in  |
	//	|                                                                         | section 2.2.4. For details, see section 3.1.4.1.1.                               |
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	| BACKUPKEY_RESTORE_GUID_WIN2K 7FE94D50-178E-11D1-AB8F-00805F14DB40       | Requests unwrapping of a server-side-wrapped secret. On input, pDataIn MUST      |
	//	|                                                                         | point to a BLOB containing the wrapped key, in the format specified in section   |
	//	|                                                                         | 2.2.4. On output, ppDataOut MUST contain a pointer to the unwrapped secret,      |
	//	|                                                                         | as supplied by the client to the BACKUPKEY_BACKUP_GUID call. For details, see    |
	//	|                                                                         | section 3.1.4.1.2.                                                               |
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	| BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID 018FF48A-EABA-40C6-8F6D-72370240E967 | Requests the public key part of the server's ClientWrap key pair. The server     |
	//	|                                                                         | MUST ignore the pDataIn and cbDataIn parameters. On output, ppDataOut MUST       |
	//	|                                                                         | contain a pointer to the server's public key in the format specified in section  |
	//	|                                                                         | 2.2.1. For details, see section 3.1.4.1.3.                                       |
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	//	| BACKUPKEY_RESTORE_GUID 47270C64-2FC7-499B-AC5B-0E37CDCE899A             | Request unwrapping of a secret that was client-side-wrapped with the server's    |
	//	|                                                                         | public key. On input, pDataIn MUST point to a client-side wrapped key, formatted |
	//	|                                                                         | as specified in section 2.2.2. On output, ppDataOut MUST contain a pointer to    |
	//	|                                                                         | the unwrapped secret, formatted as specified in section 2.2.3. For details, see  |
	//	|                                                                         | section 3.1.4.1.4.                                                               |
	//	+-------------------------------------------------------------------------+----------------------------------------------------------------------------------+
	ActionAgent *dtyp.GUID `idl:"name:pguidActionAgent" json:"action_agent"`
	// pDataIn: This is the input data supplied by the client. Its format depends on pguidActionAgent
	// as specified in this section.
	DataIn []byte `idl:"name:pDataIn;size_is:(cbDataIn)" json:"data_in"`
	// cbDataIn: This MUST be an unsigned 32-bit integer, encoded in little-endian format.
	// It MUST be equal to the length, in bytes, of the data supplied in pDataIn.
	DataInLength uint32 `idl:"name:cbDataIn" json:"data_in_length"`
	// dwParam: This parameter is unused. It MUST be ignored by the server.
	Param uint32 `idl:"name:dwParam" json:"param"`
}

BackupKeyRequest structure represents the BackuprKey operation request

func (*BackupKeyRequest) MarshalNDR

func (o *BackupKeyRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*BackupKeyRequest) UnmarshalNDR

func (o *BackupKeyRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type BackupKeyResponse

type BackupKeyResponse struct {
	// ppDataOut: This is the output data returned to the client. Its format depends on
	// pguidActionAgent as specified in this section.
	DataOut []byte `idl:"name:ppDataOut;size_is:(, pcbDataOut)" json:"data_out"`
	// pcbDataOut: This MUST be an unsigned 32-bit integer, encoded in little-endian format.
	// It MUST be equal to the length, in bytes, of the data returned in pDataOut.
	DataOutLength uint32 `idl:"name:pcbDataOut" json:"data_out_length"`
	// Return: The BackuprKey return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

BackupKeyResponse structure represents the BackuprKey operation response

func (*BackupKeyResponse) MarshalNDR

func (o *BackupKeyResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*BackupKeyResponse) UnmarshalNDR

func (o *BackupKeyResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type BackupKeyServer

type BackupKeyServer interface {

	// This section specifies the BackuprKey method.
	//
	// Return Values: The server MUST return 0 if it successfully processes the message
	// received from the client, and a nonzero value otherwise.
	//
	// Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying
	// RPC protocol [MS-RPCE].
	BackupKey(context.Context, *BackupKeyRequest) (*BackupKeyResponse, error)
}

BackupKey server interface.

Jump to

Keyboard shortcuts

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