Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package org.cyclonedx.model.component.crypto;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;

import java.util.List;

public class Ikev2TransformTypes {

@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "encr")
@JsonProperty("encr")
private List<String> encr;

@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "prf")
@JsonProperty("prf")
private List<String> prf;

@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "integ")
@JsonProperty("integ")
private List<String> integ;

@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "ke")
@JsonProperty("ke")
private List<String> ke;

@JsonProperty("esn")
private Boolean esn;

@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "auth")
@JsonProperty("auth")
private List<String> auth;

public Ikev2TransformTypes() {
}

public List<String> getEncr() {
return encr;
}

public void setEncr(List<String> encr) {
this.encr = encr;
}

public List<String> getPrf() {
return prf;
}

public void setPrf(List<String> prf) {
this.prf = prf;
}

public List<String> getInteg() {
return integ;
}

public void setInteg(List<String> integ) {
this.integ = integ;
}

public List<String> getKe() {
return ke;
}

public void setKe(List<String> ke) {
this.ke = ke;
}

public Boolean getEsn() {
return esn;
}

public void setEsn(Boolean esn) {
this.esn = esn;
}

public List<String> getAuth() {
return auth;
}

public void setAuth(List<String> auth) {
this.auth = auth;
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.cyclonedx.model.component.crypto;

import java.util.List;
import java.util.Map;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
Expand All @@ -23,9 +22,10 @@ public class ProtocolProperties

private List<CipherSuite> cipherSuites;

private Map<String, CryptoRef> ikev2TransformTypes;
@JsonProperty("ikev2TransformTypes")
private Ikev2TransformTypes ikev2TransformTypes;

private CryptoRef cryptoRefArray;
private List<String> cryptoRefArray;

public ProtocolType getType() {
return type;
Expand Down Expand Up @@ -54,19 +54,22 @@ public void setCipherSuites(final List<CipherSuite> cipherSuites) {
this.cipherSuites = cipherSuites;
}

public Map<String, CryptoRef> getIkev2TransformTypes() {
public Ikev2TransformTypes getIkev2TransformTypes() {
return ikev2TransformTypes;
}

public void setIkev2TransformTypes(final Map<String, CryptoRef> ikev2TransformTypes) {
public void setIkev2TransformTypes(final Ikev2TransformTypes ikev2TransformTypes) {
this.ikev2TransformTypes = ikev2TransformTypes;
}

public CryptoRef getCryptoRefArray() {
@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "cryptoRef")
@JsonProperty("cryptoRefArray")
public List<String> getCryptoRefArray() {
return cryptoRefArray;
}

public void setCryptoRefArray(final CryptoRef cryptoRefArray) {
public void setCryptoRefArray(final List<String> cryptoRefArray) {
this.cryptoRefArray = cryptoRefArray;
}

Expand Down
11 changes: 10 additions & 1 deletion src/test/resources/1.6/valid-cryptography-full-1.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@
"0xC0"
]
}
]
],
"ikev2TransformTypes" : {
"encr" : [ "bom-ref-to-encryption-algorithm", "bom-ref-to-encryption-algorithm1" ],
"prf" : [ "bom-ref-to-pseudorandom-function" ],
"integ" : [ "bom-ref-to-integrity-algorithm" ],
"ke" : [ "bom-ref-to-key-exchange-method" ],
"esn" : true,
"auth" : [ "bom-ref-to-authentication-method" ]
},
"cryptoRefArray" : [ "test", "test1" ]
},
"oid": "oid:1.2.3.4.5.6.7.8.9"
}
Expand Down
11 changes: 11 additions & 0 deletions src/test/resources/1.6/valid-cryptography-full-1.6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@
</identifiers>
</cipherSuite>
</cipherSuites>
<ikev2TransformTypes>
<encr>bom-ref-to-encryption-algorithm</encr>
<encr>bom-ref-to-encryption-algorithm1</encr>
<prf>bom-ref-to-pseudorandom-function</prf>
<integ>bom-ref-to-integrity-algorithm</integ>
<ke>bom-ref-to-key-exchange-method</ke>
<esn>true</esn>
<auth>bom-ref-to-authentication-method</auth>
</ikev2TransformTypes>
<cryptoRef>test</cryptoRef>
<cryptoRef>test1</cryptoRef>
</protocolProperties>
<oid>oid:1.2.3.4.5.6.7.8.9</oid>
</cryptoProperties>
Expand Down