/// <summary> /// 'Stop' the CA by de-rereferencing the CA instance /// </summary> public void StopCA() { if (CAStatus == CAstatus.Running) { // Update mutable fields this.lastSerial = ca.LastSerialNumber; this.lastCRL = ca.LastCRLNumber; ca.StopCA(); // event log ca = null; status = CAstatus.Stopped; } }
/// <summary> /// 'Start' the CA by creating an instance of the CA /// </summary> /// <param name="Password"></param> public void StartCA(string Password) { if (CAStatus == CAstatus.Stopped) { try { ca = osca.OSCA.LoadCA(configFileName, Password); status = CAstatus.Running; } catch (Exception ex) { MessageBox.Show("Problem starting the CA: " + ex.Message, "OSCA", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } }