29 references to StrongName
Microsoft.DotNet.SignTool (4)
src\Configuration.cs (1)
377
isAlreadyStrongNamed =
StrongName
.IsSigned(file.FullPath, snPath:_snPath, log: _log);
src\RealSignTool.cs (2)
84
StrongName
.ClearStrongNameSignedBit(assemblyPath);
105
return
StrongName
.IsSigned(fileFullPath, snPath:_snPath, log: _log);
src\SignTool.cs (1)
229
return
StrongName
.Sign(file.FullPath, file.SignInfo.StrongName, _args.SNBinaryPath, _log);
Microsoft.DotNet.SignTool.Tests (25)
SignToolTests.cs (25)
2758
StrongName
.IsSigned(GetResourcePath("AspNetCoreCrossLib.dll")).Should().BeFalse();
2759
StrongName
.IsSigned(GetResourcePath("CoreLibCrossARM.dll")).Should().BeFalse();
2760
StrongName
.IsSigned(GetResourcePath("EmptyPKT.dll")).Should().BeFalse();
2761
StrongName
.IsSigned(GetResourcePath("DelaySigned.dll")).Should().BeFalse();
2762
StrongName
.IsSigned(GetResourcePath("ProjectOne.dll")).Should().BeFalse();
2829
int checksumStart = peHeaders.PEHeaderStartOffset +
StrongName
.ChecksumOffsetInPEHeader;
2831
StrongName
.IsSigned(outputStream).Should().BeTrue();
2843
int checksumStart = peHeaders.PEHeaderStartOffset +
StrongName
.ChecksumOffsetInPEHeader;
2845
StrongName
.IsSigned(outputStream).Should().BeFalse();
2859
int checksumStart = peHeaders.PEHeaderStartOffset +
StrongName
.ChecksumOffsetInPEHeader;
2863
StrongName
.IsSigned(outputStream).Should().BeFalse();
2869
StrongName
.IsSigned(GetResourcePath("SignedLibrary.dll")).Should().BeTrue();
2870
StrongName
.IsSigned(GetResourcePath("StrongNamedWithEcmaKey.dll")).Should().BeTrue();
2876
StrongName
.IsSigned_Legacy(GetResourcePath("SignedLibrary.dll"), s_snPath).Should().BeTrue();
2877
StrongName
.IsSigned_Legacy(GetResourcePath("StrongNamedWithEcmaKey.dll"), s_snPath).Should().BeTrue();
2887
StrongName
.IsSigned(resourcePath).Should().Be(initiallySigned);
2888
StrongName
.Sign(resourcePath, GetResourcePath(key));
2889
StrongName
.IsSigned(resourcePath).Should().BeTrue();
2892
StrongName
.IsSigned_Legacy(resourcePath, s_snPath).Should().Be(
2904
StrongName
.IsSigned_Legacy(resourcePath, s_snPath).Should().Be(initiallySigned);
2906
StrongName
.ClearStrongNameSignedBit(resourcePath);
2907
StrongName
.Sign_Legacy(resourcePath, GetResourcePath(key), s_snPath).Should().BeTrue();
2908
StrongName
.IsSigned(resourcePath).Should().BeTrue();
2917
Action shouldFail = () =>
StrongName
.Sign(inputStream, GetResourcePath("OpenSignedCorrespondingKey.snk"));
2928
Action shouldFail = () =>
StrongName
.Sign(inputStream, GetResourcePath("OpenSignedCorrespondingKey.snk"));