/// <summary> /// We need a password, raise an event to fetch it. /// </summary> /// <param name="pwType"> /// name of the password (e.g. 'private key') /// </param> /// <returns>the given password, null if none</returns> internal string getPW(string pwType) { if (noevents) { return(null); } m_logs.logDebugLine(1, "Asking user for password \"" + pwType + "\""); OVPNNeedPasswordEventArgs args = new OVPNNeedPasswordEventArgs(pwType); if (needPassword != null) { needPassword(this, args); } else { return(null); } return(args.password); }
/// <summary> /// We need a password, raise an event to fetch it. /// </summary> /// <param name="pwType"> /// name of the password (e.g. 'private key') /// </param> /// <returns>the given password, null if none</returns> internal string getPW(string pwType) { if (noevents) return null; m_logs.logDebugLine(1, "Asking user for password \"" + pwType + "\""); OVPNNeedPasswordEventArgs args = new OVPNNeedPasswordEventArgs(pwType); if(needPassword != null) needPassword(this, args); else return null; return args.password; }