private static bool VerifyBinaryDigitalSignature(string path) { // Verify digital signature string output; string error; int exitCode = SignToolRunner.ExecuteSignatureVerification(path, out output, out error); return(exitCode == 0); }
private static bool SignBinary(string path, SignData arguments, StringBuilder outputBuffer, StringBuilder errorBuffer) { if (arguments == null) { throw new ArgumentNullException("arguments"); } string output; string error; int exitCode = SignToolRunner.ExecuteCommand(path, arguments, out output, out error); if (!string.IsNullOrEmpty(output) && outputBuffer != null) { outputBuffer.AppendLine(output); } if (!string.IsNullOrEmpty(error) && errorBuffer != null) { errorBuffer.AppendLine(error); } return(exitCode == 0); }