-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use managed signer for bundles #110417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Use managed signer for bundles #110417
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5800a18
Use managed signer for bundles
jtschuster 0555c08
Fix tests and write out symtab
jtschuster 416e029
Fix test failures
jtschuster 81e5cf1
Flip comparison
jtschuster 5dd384f
Add comment to TryAdjustHeadersForBundle, and throw if it returns false
jtschuster 031fe60
Don't memory-map file if it's not a Mach-O, remove unused file.
jtschuster 7ee6a45
Fix typo, restructure IsSigned check.
jtschuster ec5b478
PR Feedback: Fomatting and comments
jtschuster 5c381c7
PR feedback:
jtschuster e6fec41
Create new file for macos signing, update LINKEDIT.VMSize to fit sign…
jtschuster 11893bd
Merge branch 'main' into ManagedSignBundles
jtschuster c6d3c55
Merge branch 'main' into ManagedSignBundles
jtschuster 163a8e1
PR feedback
jtschuster 443b151
Merge branch 'main' of https://github.com/dotnet/runtime into Managed…
jtschuster 32c8bb0
Remove old file that's not needed
jtschuster d50db43
Merge branch 'ManagedSignBundles' of https://github.com/jtschuster/ru…
jtschuster 2b2f820
Merge branch 'main' of https://github.com/dotnet/runtime into Managed…
jtschuster ef1cb02
Use constant for alignments
jtschuster c29f085
Merge branch 'main' into ManagedSignBundles
jtschuster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 0 additions & 168 deletions
168
src/installer/managed/Microsoft.NET.HostModel/AppHost/MachOUtils.cs
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/installer/managed/Microsoft.NET.HostModel/MachO/BinaryFormat/SymbolTableCommand.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.InteropServices; | ||
|
||
namespace Microsoft.NET.HostModel.MachO; | ||
|
||
/// <summary> | ||
/// A load command with info about the location of the symbol table and string table. | ||
/// See https://github.com/apple-oss-distributions/cctools/blob/7a5450708479bbff61527d5e0c32a3f7b7e4c1d0/include/mach-o/loader.h#L908 for reference. | ||
/// </summary> | ||
[StructLayout(LayoutKind.Sequential)] | ||
internal struct SymbolTableCommand | ||
{ | ||
private readonly MachLoadCommandType _command; | ||
private readonly uint _commandSize; | ||
public uint _symbolTableOffset; | ||
public uint _symbolsCount; | ||
private uint _stringTableOffset; | ||
private uint _stringTableSize; // in bytes | ||
|
||
public bool IsDefault => this.Equals(default(SymbolTableCommand)); | ||
|
||
public uint GetSymbolTableOffset(MachHeader header) => header.ConvertValue(_symbolTableOffset); | ||
public void SetSymbolTableOffset(uint value, MachHeader header) => _symbolTableOffset = header.ConvertValue(value); | ||
public uint GetSymbolsCount(MachHeader header) => header.ConvertValue(_symbolsCount); | ||
public void SetSymbolsCount(uint value, MachHeader header) => _symbolsCount = header.ConvertValue(value); | ||
public uint GetStringTableOffset(MachHeader header) => header.ConvertValue(_stringTableOffset); | ||
public void SetStringTableOffset(uint value, MachHeader header) => _stringTableOffset = header.ConvertValue(value); | ||
public uint GetStringTableSize(MachHeader header) => header.ConvertValue(_stringTableSize); | ||
public void SetStringTableSize(uint value, MachHeader header) => _stringTableSize = header.ConvertValue(value); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.