avancement planning
This commit is contained in:
+10
-8
@@ -9,15 +9,17 @@ function toSignedEntity(bundle, artifact) {
|
||||
const { tlogEntries, timestampVerificationData } = bundle.verificationMaterial;
|
||||
const timestamps = [];
|
||||
for (const entry of tlogEntries) {
|
||||
timestamps.push({
|
||||
$case: 'transparency-log',
|
||||
tlogEntry: entry,
|
||||
});
|
||||
if (entry.integratedTime && entry.integratedTime !== '0') {
|
||||
timestamps.push({
|
||||
$case: 'transparency-log',
|
||||
tlogEntry: entry,
|
||||
});
|
||||
}
|
||||
}
|
||||
for (const ts of timestampVerificationData?.rfc3161Timestamps ?? []) {
|
||||
timestamps.push({
|
||||
$case: 'timestamp-authority',
|
||||
timestamp: core_1.RFC3161Timestamp.parse(ts.signedTimestamp),
|
||||
timestamp: core_1.RFC3161Timestamp.parse(Buffer.from(ts.signedTimestamp)),
|
||||
});
|
||||
}
|
||||
return {
|
||||
@@ -45,13 +47,13 @@ function key(bundle) {
|
||||
case 'x509CertificateChain':
|
||||
return {
|
||||
$case: 'certificate',
|
||||
certificate: core_1.X509Certificate.parse(bundle.verificationMaterial.content.x509CertificateChain
|
||||
.certificates[0].rawBytes),
|
||||
certificate: core_1.X509Certificate.parse(Buffer.from(bundle.verificationMaterial.content.x509CertificateChain
|
||||
.certificates[0].rawBytes)),
|
||||
};
|
||||
case 'certificate':
|
||||
return {
|
||||
$case: 'certificate',
|
||||
certificate: core_1.X509Certificate.parse(bundle.verificationMaterial.content.certificate.rawBytes),
|
||||
certificate: core_1.X509Certificate.parse(Buffer.from(bundle.verificationMaterial.content.certificate.rawBytes)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user