@@ -447,18 +447,13 @@ public void Sign(X509Certificate2 certificate, RSA privateKey)
447447 byte [ ] certData = certificate . Export ( X509ContentType . Cert ) ;
448448 string name = certificate . GetCertHashString ( ) ;
449449
450- Logger . LogDebug ( "Adding entry name: {name} to protected entry names" , name ) ;
451- ProtectedEntryNames . Add ( name ) ;
452-
453450 Logger . LogDebug ( "Signing manifest" ) ;
454451 byte [ ] manifestData = GetManifestData ( ) ;
455452 byte [ ] signature = privateKey . SignData ( manifestData , HashAlgorithmName . SHA512 , RSASignaturePadding . Pkcs1 ) ;
456453
457- Logger . LogDebug ( "Pending file: {name} for adding to the bundle" , name ) ;
458- _pendingForAdd [ name ] = certData ;
459-
460454 Logger . LogDebug ( "Adding signature for certificate: {name} to signatures" , name ) ;
461455 Signatures . Entries [ name ] = signature ;
456+ Signatures . Certificates [ name ] = certData ;
462457
463458 Logger . LogInformation ( "Bundle signed with certificate: {name}" , certificate . Subject ) ;
464459 }
@@ -579,7 +574,7 @@ public X509Certificate2 GetCertificate(string certificateHash)
579574
580575 Logger . LogInformation ( "Getting certificate with hash: {hash}" , certificateHash ) ;
581576
582- byte [ ] certData = GetBytes ( certificateHash , ReadSource . Bundle ) ;
577+ byte [ ] certData = Signatures . Certificates [ certificateHash ] ;
583578
584579#if NET9_0_OR_GREATER
585580 X509Certificate2 certificate = X509CertificateLoader . LoadCertificate ( certData ) ;
0 commit comments