@@ -454,7 +454,7 @@ public void Sign(X509Certificate2 certificate, RSA privateKey)
454454 string pemContents = pemBuilder . ToString ( ) ;
455455
456456 Logger . LogDebug ( "Signing manifest" ) ;
457- byte [ ] manifestData = Export ( Manifest , SourceGenerationManifestContext . Default ) ;
457+ byte [ ] manifestData = GetManifestData ( ) ;
458458 byte [ ] signature = privateKey . SignData ( manifestData , HashAlgorithmName . SHA512 , RSASignaturePadding . Pkcs1 ) ;
459459
460460 Logger . LogDebug ( "Pending file: {name} for embedding in the bundle" , name ) ;
@@ -707,7 +707,7 @@ public void Update()
707707 Updating ? . Invoke ( zip ) ;
708708
709709 Logger . LogDebug ( "Writing manifest to the bundle" ) ;
710- byte [ ] manifestData = Export ( Manifest , SourceGenerationManifestContext . Default ) ;
710+ byte [ ] manifestData = GetManifestData ( ) ;
711711 WriteEntry ( zip , ".manifest.ec" , manifestData ) ;
712712
713713 Logger . LogDebug ( "Writing signatures to the bundle" ) ;
@@ -726,6 +726,19 @@ public void Update()
726726 }
727727 }
728728
729+ /// <summary>
730+ /// Gets the manifest data as a byte array.
731+ /// </summary>
732+ /// <returns>
733+ /// A byte array containing the manifest data.
734+ /// </returns>
735+ protected virtual byte [ ] GetManifestData ( )
736+ {
737+ Manifest . UpdatedBy = GetType ( ) . FullName ;
738+
739+ return Export ( Manifest , SourceGenerationManifestContext . Default ) ;
740+ }
741+
729742 /// <summary>
730743 /// Exports the specified structured data to a byte array.
731744 /// </summary>
0 commit comments