28 references to StrongNameHelper
Microsoft.DotNet.SignCheckLibrary (2)
Verification\PortableExecutableVerifier.cs (2)
75
svr.IsStrongNameSigned =
StrongNameHelper
.IsSigned(svr.FullPath);
80
if (
StrongNameHelper
.GetStrongNameTokenFromAssembly(svr.FullPath, out string tokenStr) == 0)
Microsoft.DotNet.SignTool (4)
src\Configuration.cs (1)
566
bool isAlreadyStrongNamed =
StrongNameHelper
.IsSigned(file.FullPath, snPath: _snPath);
src\RealSignTool.cs (2)
114
StrongNameHelper
.ClearStrongNameSignedBit(assemblyPath);
135
return
StrongNameHelper
.IsSigned(fileFullPath, snPath:_snPath) ? SigningStatus.Signed : SigningStatus.NotSigned;
src\SignTool.cs (1)
252
return
StrongNameHelper
.Sign(file.FullPath, file.SignInfo.StrongName, _args.SNBinaryPath);
Microsoft.DotNet.SignTool.Tests (22)
SignToolTests.cs (22)
3032
StrongNameHelper
.IsSigned(GetResourcePath("AspNetCoreCrossLib.dll")).Should().BeFalse();
3033
StrongNameHelper
.IsSigned(GetResourcePath("CoreLibCrossARM.dll")).Should().BeFalse();
3034
StrongNameHelper
.IsSigned(GetResourcePath("EmptyPKT.dll")).Should().BeFalse();
3035
StrongNameHelper
.IsSigned(GetResourcePath("DelaySigned.dll")).Should().BeFalse();
3036
StrongNameHelper
.IsSigned(GetResourcePath("ProjectOne.dll")).Should().BeFalse();
3105
StrongNameHelper
.IsSigned(outputStream).Should().BeTrue();
3119
StrongNameHelper
.IsSigned(outputStream).Should().BeFalse();
3137
StrongNameHelper
.IsSigned(outputStream).Should().BeFalse();
3143
StrongNameHelper
.IsSigned(GetResourcePath("SignedLibrary.dll")).Should().BeTrue();
3144
StrongNameHelper
.IsSigned(GetResourcePath("StrongNamedWithEcmaKey.dll")).Should().BeTrue();
3150
StrongNameHelper
.IsSigned_Legacy(GetResourcePath("SignedLibrary.dll"), s_snPath).Should().BeTrue();
3151
StrongNameHelper
.IsSigned_Legacy(GetResourcePath("StrongNamedWithEcmaKey.dll"), s_snPath).Should().BeTrue();
3161
StrongNameHelper
.IsSigned(resourcePath).Should().Be(initiallySigned);
3162
StrongNameHelper
.Sign(resourcePath, GetResourcePath(key));
3163
StrongNameHelper
.IsSigned(resourcePath).Should().BeTrue();
3166
StrongNameHelper
.IsSigned_Legacy(resourcePath, s_snPath).Should().Be(
3178
StrongNameHelper
.IsSigned_Legacy(resourcePath, s_snPath).Should().Be(initiallySigned);
3180
StrongNameHelper
.ClearStrongNameSignedBit(resourcePath);
3181
StrongNameHelper
.Sign_Legacy(resourcePath, GetResourcePath(key), s_snPath).Should().BeTrue();
3182
StrongNameHelper
.IsSigned(resourcePath).Should().BeTrue();
3191
Action shouldFail = () =>
StrongNameHelper
.Sign(inputStream, GetResourcePath("OpenSignedCorrespondingKey.snk"));
3202
Action shouldFail = () =>
StrongNameHelper
.Sign(inputStream, GetResourcePath("OpenSignedCorrespondingKey.snk"));