Updates to point to certificate inside botdata folder
This commit is contained in:
parent
828813ae2d
commit
2f0d6848b5
4 changed files with 23 additions and 10 deletions
|
@ -7,7 +7,7 @@ using LibZNI;
|
|||
[assembly: AssemblyCompany("ZNI")]
|
||||
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
|
||||
[assembly: AssemblyCopyright("(C) 2020 Tara Piccari")]
|
||||
[assembly: AssemblyFileVersion("5.0.5.1252")]
|
||||
[assembly: AssemblyFileVersion("5.0.5.1253")]
|
||||
[assembly: AssemblyDescription("Second Life Bot - BotCore5")]
|
||||
[assembly: AutoUpdater("/job/ZBotCore/job/BotCore5", "module.tar")]
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace Bot.Assemble
|
|||
public class ASMInfo
|
||||
{
|
||||
public static string BotName = "ZBotCore";
|
||||
public static string BotVer = "5.0.5.1252";
|
||||
public static string BotVer = "5.0.5.1253";
|
||||
public static string GitPassword
|
||||
{
|
||||
get
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace Bot
|
|||
public string last { get; set; } = "";
|
||||
public string password { get; set; } = "";
|
||||
|
||||
public string SecretNewVerCode { get; set; } = "configure_me";
|
||||
|
||||
//public License LicenseKey { get; set; }
|
||||
public string ActivationCode { get; set; } = "";
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ namespace Bot.WebHookServer
|
|||
[WebhookAttribs("/NewVersionAvailable", HTTPMethod = "POST")]
|
||||
public WebhookRegistry.HTTPResponseData a_new_version_is_available(List<string> args, string body, string method, NameValueCollection headers)
|
||||
{
|
||||
if(MainConfiguration.Instance.SecretNewVerCode == body)
|
||||
{
|
||||
|
||||
WebhookRegistry.HTTPResponseData hrd = new WebhookRegistry.HTTPResponseData();
|
||||
hrd.ReplyString = "OK";
|
||||
hrd.ReturnContentType = "text/plain";
|
||||
|
@ -21,7 +24,15 @@ namespace Bot.WebHookServer
|
|||
|
||||
BotSession.Instance.EnqueueExit = true;
|
||||
|
||||
return hrd;
|
||||
} else
|
||||
{
|
||||
WebhookRegistry.HTTPResponseData hrd = new WebhookRegistry.HTTPResponseData();
|
||||
hrd.ReplyString = "Not authorized";
|
||||
hrd.ReturnContentType = "text/plain";
|
||||
hrd.Status = 500;
|
||||
return hrd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Bot.WebHookServer
|
|||
if (MainConfiguration.Instance.UseSSL)
|
||||
{
|
||||
|
||||
X509Certificate cert = new X509Certificate2(MainConfiguration.Instance.SSLCertificatePFX, MainConfiguration.Instance.SSLCertificatePWD);
|
||||
X509Certificate cert = new X509Certificate2("BotData/"+MainConfiguration.Instance.SSLCertificatePFX, MainConfiguration.Instance.SSLCertificatePWD);
|
||||
|
||||
Type hepmType = Type.GetType("System.Net.HttpEndPointManager, System.Net.HttpListener");
|
||||
Type heplType = Type.GetType("System.Net.HttpEndPointListener, System.Net.HttpListener");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue