Skip to content

Commit

Permalink
Revert "add jsf model"
Browse files Browse the repository at this point in the history
This reverts commit abee4cf.

JSF support will be implemented with #17
  • Loading branch information
nscuro committed Feb 7, 2022
1 parent abee4cf commit a672fb7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 201 deletions.
46 changes: 2 additions & 44 deletions cyclonedx.go
Expand Up @@ -55,9 +55,11 @@ type AttachedText struct {
}

type BOM struct {
// XML specific fields
XMLName xml.Name `json:"-" xml:"bom"`
XMLNS string `json:"-" xml:"xmlns,attr"`

// JSON specific fields
BOMFormat string `json:"bomFormat" xml:"-"`
SpecVersion string `json:"specVersion" xml:"-"`

Expand All @@ -71,7 +73,6 @@ type BOM struct {
Compositions *[]Composition `json:"compositions,omitempty" xml:"compositions>composition,omitempty"`
Properties *[]Property `json:"properties,omitempty" xml:"properties>property,omitempty"`
Vulnerabilities *[]Vulnerability `json:"vulnerabilities,omitempty" xml:"vulnerabilities>vulnerability,omitempty"`
Signature *Signature `json:"signature,omitempty" xml:"-"`
}

func NewBOM() *BOM {
Expand Down Expand Up @@ -161,14 +162,12 @@ type Component struct {
Components *[]Component `json:"components,omitempty" xml:"components>component,omitempty"`
Evidence *Evidence `json:"evidence,omitempty" xml:"evidence,omitempty"`
ReleaseNotes *ReleaseNotes `json:"releaseNotes,omitempty" xml:"releaseNotes,omitempty"`
Signature *Signature `json:"signature,omitempty" xml:"-"`
}

type Composition struct {
Aggregate CompositionAggregate `json:"aggregate" xml:"aggregate"`
Assemblies *[]BOMReference `json:"assemblies,omitempty" xml:"assemblies>assembly,omitempty"`
Dependencies *[]BOMReference `json:"dependencies,omitempty" xml:"dependencies>dependency,omitempty"`
Signature *Signature `json:"signature,omitempty" xml:"-"`
}

type CompositionAggregate string
Expand Down Expand Up @@ -569,7 +568,6 @@ type Service struct {
Properties *[]Property `json:"properties,omitempty" xml:"properties>property,omitempty"`
Services *[]Service `json:"services,omitempty" xml:"services>service,omitempty"`
ReleaseNotes *ReleaseNotes `json:"releaseNotes,omitempty" xml:"releaseNotes,omitempty"`
Signature *Signature `json:"signature,omitempty" xml:"-"`
}

type Severity string
Expand All @@ -584,46 +582,6 @@ const (
SeverityCritical Severity = "critical"
)

type Signature struct {
Chain []Signature `json:"chain,omitempty" xml:"-"`
Signers []Signature `json:"signers,omitempty" xml:"-"`
Algorithm SignatureAlgorithm `json:"algorithm" xml:"-"`
KeyID string `json:"keyId,omitempty" xml:"-"`
PublicKey *SignaturePublicKey `json:"publicKey,omitempty" xml:"-"`
CertificatePath []string `json:"certificatePath,omitempty" xml:"-"`
Extensions []string `json:"extensions,omitempty" xml:"-"`
Excludes []string `json:"excludes,omitempty" xml:"-"`
Value string `json:"value" xml:"-"`
}

type SignatureAlgorithm string

const (
SignatureAlgoRS256 SignatureAlgorithm = "RS256"
SignatureAlgoRS384 SignatureAlgorithm = "RS384"
SignatureAlgoRS512 SignatureAlgorithm = "RS512"
SignatureAlgoPS256 SignatureAlgorithm = "PS256"
SignatureAlgoPS384 SignatureAlgorithm = "PS384"
SignatureAlgoPS512 SignatureAlgorithm = "PS512"
SignatureAlgoES256 SignatureAlgorithm = "ES256"
SignatureAlgoES384 SignatureAlgorithm = "ES384"
SignatureAlgoES512 SignatureAlgorithm = "ES512"
SignatureAlgoEd25519 SignatureAlgorithm = "Ed25519"
SignatureAlgoEd448 SignatureAlgorithm = "Ed448"
SignatureAlgoHS256 SignatureAlgorithm = "HS256"
SignatureAlgoHS384 SignatureAlgorithm = "HS384"
SignatureAlgoHS512 SignatureAlgorithm = "HS512"
)

type SignaturePublicKey struct {
KeyType string `json:"kty" xml:"-"`
CurveName string `json:"krv" xml:"-"`
CurveX string `json:"x" xml:"-"`
CurveY string `json:"y" xml:"-"`
Modulus string `json:"n" xml:"-"`
Exponent string `json:"e" xml:"-"`
}

type Source struct {
Name string `json:"name,omitempty" xml:"name,omitempty"`
URL string `json:"url,omitempty" xml:"url,omitempty"`
Expand Down

This file was deleted.

0 comments on commit a672fb7

Please sign in to comment.