Ejemplo n.º 1
0
 def getPassphrase(self, reason=None):
     from CreateNewKeyDialog import CreateNewKeyDialog
     createNewKeyDialog = CreateNewKeyDialog(
         self.parentWindow,
         self.progressDialog,
         wx.ID_ANY,
         self.parentWindow.programName,
         self.keyModel.getPrivateKeyFilePath(),
         self.displayStrings,
         displayMessageBoxReportingSuccess=False)
     try:
         wx.EndBusyCursor()
         stoppedBusyCursor = True
     except:
         stoppedBusyCursor = False
     canceled = createNewKeyDialog.ShowModal() == wx.ID_CANCEL
     if stoppedBusyCursor:
         wx.BeginBusyCursor()
     if (not canceled):
         logger.debug("User didn't cancel from CreateNewKeyDialog.")
         self.password = createNewKeyDialog.getPassphrase()
         event = KeyDist.sshKeyDistEvent(
             KeyDist.EVT_KEYDIST_NEWPASS_COMPLETE, self)
         wx.PostEvent(self.notifywindow.GetEventHandler(), event)
     else:
         logger.debug(
             "KeyDist.getPassphrase: User canceled from CreateNewKeyDialog."
         )
         self.cancel()
Ejemplo n.º 2
0
 def getPassphrase(self,queue):
     createNewKeyDialog = CreateNewKeyDialog(self.parentWindow, self.progressDialog, wx.ID_ANY, self.parentWindow.programName, self.keyModel.getPrivateKeyFilePath(),self.displayStrings, displayMessageBoxReportingSuccess=False)
     try:
         wx.EndBusyCursor()
         stoppedBusyCursor = True
     except:
         stoppedBusyCursor = False
     canceled = createNewKeyDialog.ShowModal()==wx.ID_CANCEL
     if stoppedBusyCursor:
         wx.BeginBusyCursor()
     if (not canceled):
         logger.debug("User didn't cancel from CreateNewKeyDialog.")
         passphrase=createNewKeyDialog.getPassphrase()
         queue.put((canceled,passphrase))
     else:
         queue.put((canceled,None))
Ejemplo n.º 3
0
 def getPassphrase(self,reason=None):
     from CreateNewKeyDialog import CreateNewKeyDialog
     createNewKeyDialog = CreateNewKeyDialog(self.parentWindow, self.progressDialog, wx.ID_ANY, 'MASSIVE/CVL Launcher Private Key', self.keyModel.getPrivateKeyFilePath(),self.displayStrings, displayMessageBoxReportingSuccess=False)
     try:
         wx.EndBusyCursor()
         stoppedBusyCursor = True
     except:
         stoppedBusyCursor = False
     canceled = createNewKeyDialog.ShowModal()==wx.ID_CANCEL
     if stoppedBusyCursor:
         wx.BeginBusyCursor()
     if (not canceled):
         logger.debug("User didn't cancel from CreateNewKeyDialog.")
         self.password=createNewKeyDialog.getPassphrase()
         event = KeyDist.sshKeyDistEvent(KeyDist.EVT_KEYDIST_NEWPASS_COMPLETE,self)
         wx.PostEvent(self.notifywindow.GetEventHandler(),event)
     else:
         logger.debug("KeyDist.getPassphrase: User canceled from CreateNewKeyDialog.")
         self.cancel()
Ejemplo n.º 4
0
 def getPassphrase(self, queue):
     createNewKeyDialog = CreateNewKeyDialog(
         self.parentWindow,
         self.progressDialog,
         wx.ID_ANY,
         self.parentWindow.programName,
         self.keyModel.getPrivateKeyFilePath(),
         self.displayStrings,
         displayMessageBoxReportingSuccess=False)
     try:
         wx.EndBusyCursor()
         stoppedBusyCursor = True
     except:
         stoppedBusyCursor = False
     canceled = createNewKeyDialog.ShowModal() == wx.ID_CANCEL
     if stoppedBusyCursor:
         wx.BeginBusyCursor()
     if (not canceled):
         logger.debug("User didn't cancel from CreateNewKeyDialog.")
         passphrase = createNewKeyDialog.getPassphrase()
         queue.put((canceled, passphrase))
     else:
         queue.put((canceled, None))