-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Alzate <aalzate@sonatype.com>
- Loading branch information
Showing
25 changed files
with
1,288 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
src/main/java/org/cyclonedx/model/component/crypto/AlgorithmProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
package org.cyclonedx.model.component.crypto; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | ||
import org.cyclonedx.model.component.crypto.enums.CertificationLevel; | ||
import org.cyclonedx.model.component.crypto.enums.CryptoFunction; | ||
import org.cyclonedx.model.component.crypto.enums.ExecutionEnvironment; | ||
import org.cyclonedx.model.component.crypto.enums.ImplementationPlatform; | ||
import org.cyclonedx.model.component.crypto.enums.Mode; | ||
import org.cyclonedx.model.component.crypto.enums.Padding; | ||
import org.cyclonedx.model.component.crypto.enums.Primitive; | ||
import org.cyclonedx.util.deserializer.CertificationLevelDeserializer; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonPropertyOrder({ | ||
"primitive", | ||
"parameterSetIdentifier", | ||
"curve", | ||
"executionEnvironment", | ||
"implementationPlatform", | ||
"certificationLevel", "mode", "padding", "cryptoFunctions", | ||
"classicalSecurityLevel", "nistQuantumSecurityLevel" | ||
}) | ||
public class AlgorithmProperties | ||
{ | ||
private Primitive primitive; | ||
|
||
private String parameterSetIdentifier; | ||
|
||
private String curve; | ||
|
||
private ExecutionEnvironment executionEnvironment; | ||
|
||
private ImplementationPlatform implementationPlatform; | ||
|
||
@JsonDeserialize(using = CertificationLevelDeserializer.class) | ||
private CertificationLevel certificationLevel; | ||
|
||
private Mode mode; | ||
|
||
private Padding padding; | ||
|
||
private List<CryptoFunction> cryptoFunctions; | ||
|
||
private Integer classicalSecurityLevel; | ||
|
||
private Integer nistQuantumSecurityLevel; | ||
|
||
public Primitive getPrimitive() { | ||
return primitive; | ||
} | ||
|
||
public void setPrimitive(final Primitive primitive) { | ||
this.primitive = primitive; | ||
} | ||
|
||
public String getParameterSetIdentifier() { | ||
return parameterSetIdentifier; | ||
} | ||
|
||
public void setParameterSetIdentifier(final String parameterSetIdentifier) { | ||
this.parameterSetIdentifier = parameterSetIdentifier; | ||
} | ||
|
||
public String getCurve() { | ||
return curve; | ||
} | ||
|
||
public void setCurve(final String curve) { | ||
this.curve = curve; | ||
} | ||
|
||
public ExecutionEnvironment getExecutionEnvironment() { | ||
return executionEnvironment; | ||
} | ||
|
||
public void setExecutionEnvironment(final ExecutionEnvironment executionEnvironment) { | ||
this.executionEnvironment = executionEnvironment; | ||
} | ||
|
||
public ImplementationPlatform getImplementationPlatform() { | ||
return implementationPlatform; | ||
} | ||
|
||
public void setImplementationPlatform(final ImplementationPlatform implementationPlatform) { | ||
this.implementationPlatform = implementationPlatform; | ||
} | ||
|
||
public CertificationLevel getCertificationLevel() { | ||
return certificationLevel; | ||
} | ||
|
||
public void setCertificationLevel(final CertificationLevel certificationLevel) { | ||
this.certificationLevel = certificationLevel; | ||
} | ||
|
||
public Mode getMode() { | ||
return mode; | ||
} | ||
|
||
public void setMode(final Mode mode) { | ||
this.mode = mode; | ||
} | ||
|
||
public Padding getPadding() { | ||
return padding; | ||
} | ||
|
||
public void setPadding(final Padding padding) { | ||
this.padding = padding; | ||
} | ||
|
||
@JacksonXmlElementWrapper(localName = "cryptoFunctions") | ||
@JacksonXmlProperty(localName = "cryptoFunction") | ||
public List<CryptoFunction> getCryptoFunctions() { | ||
return cryptoFunctions; | ||
} | ||
|
||
public void setCryptoFunctions(final List<CryptoFunction> cryptoFunctions) { | ||
this.cryptoFunctions = cryptoFunctions; | ||
} | ||
|
||
public Integer getClassicalSecurityLevel() { | ||
return classicalSecurityLevel; | ||
} | ||
|
||
public void setClassicalSecurityLevel(final Integer classicalSecurityLevel) { | ||
this.classicalSecurityLevel = classicalSecurityLevel; | ||
} | ||
|
||
public Integer getNistQuantumSecurityLevel() { | ||
return nistQuantumSecurityLevel; | ||
} | ||
|
||
public void setNistQuantumSecurityLevel(final Integer nistQuantumSecurityLevel) { | ||
this.nistQuantumSecurityLevel = nistQuantumSecurityLevel; | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
src/main/java/org/cyclonedx/model/component/crypto/CertificateProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package org.cyclonedx.model.component.crypto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonPropertyOrder({ | ||
"subjectName", | ||
"issuerName", | ||
"notValidBefore", | ||
"notValidAfter", | ||
"signatureAlgorithmRef", | ||
"subjectPublicKeyRef", | ||
"certificateFormat", | ||
"certificateExtension" | ||
}) | ||
public class CertificateProperties | ||
{ | ||
private String subjectName; | ||
|
||
private String issuerName; | ||
|
||
private String notValidBefore; | ||
|
||
private String notValidAfter; | ||
|
||
private String signatureAlgorithmRef; | ||
|
||
private String subjectPublicKeyRef; | ||
|
||
private String certificateFormat; | ||
|
||
private String certificateExtension; | ||
|
||
public String getSubjectName() { | ||
return subjectName; | ||
} | ||
|
||
public void setSubjectName(final String subjectName) { | ||
this.subjectName = subjectName; | ||
} | ||
|
||
public String getIssuerName() { | ||
return issuerName; | ||
} | ||
|
||
public void setIssuerName(final String issuerName) { | ||
this.issuerName = issuerName; | ||
} | ||
|
||
public String getNotValidBefore() { | ||
return notValidBefore; | ||
} | ||
|
||
public void setNotValidBefore(final String notValidBefore) { | ||
this.notValidBefore = notValidBefore; | ||
} | ||
|
||
public String getNotValidAfter() { | ||
return notValidAfter; | ||
} | ||
|
||
public void setNotValidAfter(final String notValidAfter) { | ||
this.notValidAfter = notValidAfter; | ||
} | ||
|
||
public String getSignatureAlgorithmRef() { | ||
return signatureAlgorithmRef; | ||
} | ||
|
||
public void setSignatureAlgorithmRef(final String signatureAlgorithmRef) { | ||
this.signatureAlgorithmRef = signatureAlgorithmRef; | ||
} | ||
|
||
public String getSubjectPublicKeyRef() { | ||
return subjectPublicKeyRef; | ||
} | ||
|
||
public void setSubjectPublicKeyRef(final String subjectPublicKeyRef) { | ||
this.subjectPublicKeyRef = subjectPublicKeyRef; | ||
} | ||
|
||
public String getCertificateFormat() { | ||
return certificateFormat; | ||
} | ||
|
||
public void setCertificateFormat(final String certificateFormat) { | ||
this.certificateFormat = certificateFormat; | ||
} | ||
|
||
public String getCertificateExtension() { | ||
return certificateExtension; | ||
} | ||
|
||
public void setCertificateExtension(final String certificateExtension) { | ||
this.certificateExtension = certificateExtension; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/org/cyclonedx/model/component/crypto/CipherSuite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.cyclonedx.model.component.crypto; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonPropertyOrder({"name", "algorithms", "identifiers"}) | ||
public class CipherSuite | ||
{ | ||
|
||
private String name; | ||
|
||
private List<String> algorithms; | ||
|
||
private List<String> identifiers; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(final String name) { | ||
this.name = name; | ||
} | ||
|
||
public List<String> getAlgorithms() { | ||
return algorithms; | ||
} | ||
|
||
public void setAlgorithms(final List<String> algorithms) { | ||
this.algorithms = algorithms; | ||
} | ||
|
||
public List<String> getIdentifiers() { | ||
return identifiers; | ||
} | ||
|
||
public void setIdentifiers(final List<String> identifiers) { | ||
this.identifiers = identifiers; | ||
} | ||
} |
Oops, something went wrong.