-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi, I was trying to create "cryptoRefArray" like the protocol example of CBOM.
However, My code generates slightly different results from the protocol example and the results is not valid by schema validation.
So, I'd like to ask you how to change my code for valid CryptoRefArray.
Thank you.
- Protocol Example
https://github.com/CycloneDX/bom-examples/blob/master/CBOM/Protocol/bom.json
"cryptoRefArray": [ "crypto/certificate/google.com@sha256:1e15e0fbd3ce95bde5945633ae96add551341b11e5bae7bba12e98ad84a5beb4" ]
- My code
// CryptoRef instance
List ref = new ArrayList<>();
ref.add("crypto/certificate/google.com@sha256:1e15e0fbd3ce95bde5945633ae96add551341b11e5bae7bba12e98ad84a5beb4");
CryptoRef cryptoRef = new CryptoRef();
cryptoRef.setRef(ref);
// setCryptoRefArray ( parameter is cryptoRef instead of List )
protocolComponent.getCryptoProperties().getProtocolProperties().setCryptoRefArray(cryptoRef);
- The results of my code
"cryptoRefArray" : {
"ref" : [ "crypto/certificate/google.com@sha256:1e15e0fbd3ce95bde5945633ae96add551341b11e5bae7bba12e98ad84a5beb4"
]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working