directoryservice

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package directoryservice provides test helpers for Directory Service JWS fixtures.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartHTTPSDirectoryService

func StartHTTPSDirectoryService(t *testing.T, body []byte) *httptest.Server

StartHTTPSDirectoryService serves signed JWS listing bodies over HTTPS.

Types

type Ed25519Fixture

type Ed25519Fixture struct {
	PublicKey  ed25519.PublicKey
	PrivateKey ed25519.PrivateKey
	PublicPEM  string
}

Ed25519Fixture holds a signing key pair and PEM for Directory Service JWS tests.

func GenerateEd25519Fixture

func GenerateEd25519Fixture(t *testing.T) Ed25519Fixture

GenerateEd25519Fixture creates an Ed25519 key pair for JWS signing tests.

func (Ed25519Fixture) SignListingCompact

func (f Ed25519Fixture) SignListingCompact(t *testing.T, listing ds.Listing) []byte

SignListingCompact returns a compact-serialized JWS for the given listing payload.

func (Ed25519Fixture) VerificationKey

func (f Ed25519Fixture) VerificationKey() ds.VerificationKey

VerificationKey returns the directoryservice.VerificationKey for this fixture.

Jump to

Keyboard shortcuts

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