logo

Class to verify files with GnuPG More...

Public Member Functions

bool VerifyDownload (string file, string sigfile)
 Verify a file. More...
 
string GetGPGPath ()
 Try to find the path to gpg.exe or gpg. More...
 

Public Attributes

const string GPGSIGNATUREEXTENSION = ".sig"
 The GnuPG signature file extension. More...
 

Private Member Functions

string FindGPGexecutables (string gpginstallpath)
 Find the gpg executable in the installation directory. More...
 
string GetProgramFilesx86 ()
 Get the path to program files, for 32bits applications. More...
 
void StandardOutputReader ()
 Reader thread for standard output of gpg.exe More...
 
void StandardErrorReader ()
 Reader thread for standard error More...
 
bool IsGPGNoteFlyPublicKeyAdded ()
 Check if the NoteFly public key is added to the GPG keyring. More...
 
void GetGPGNoteFlyPublicKey ()
 Get the NoteFly OpenPGP Public Key from a key server More...
 
int StartGPGReadingThreads ()
 Start reading the output normal and errors from created threads and then copy the output to gpgoutput and gpgerror. More...
 

Private Attributes

Process gpgproc
 GnuPG process reference. More...
 
string gpgoutput
 Output stream. More...
 
string gpgerror
 Error stream. More...
 

Detailed Description

Member Function Documentation

string NoteFly.GPGVerifyWrapper.FindGPGexecutables ( string  gpginstallpath)
private
Parameters
gpginstallpathThe installation directory
Returns
The full path to the gpg executable, empty string if gpg executable not found.
void NoteFly.GPGVerifyWrapper.GetGPGNoteFlyPublicKey ( )
private
string NoteFly.GPGVerifyWrapper.GetGPGPath ( )
Returns
The full path to GnuPG process
string NoteFly.GPGVerifyWrapper.GetProgramFilesx86 ( )
private
Returns
The path to the Program files folder.
bool NoteFly.GPGVerifyWrapper.IsGPGNoteFlyPublicKeyAdded ( )
private
Returns
True if notefly public key is added.
void NoteFly.GPGVerifyWrapper.StandardErrorReader ( )
private
void NoteFly.GPGVerifyWrapper.StandardOutputReader ( )
private
int NoteFly.GPGVerifyWrapper.StartGPGReadingThreads ( )
private
Returns
GPG process exit code
bool NoteFly.GPGVerifyWrapper.VerifyDownload ( string  file,
string  sigfile 
)
Parameters
fileThe path to the local file that was downloaded
sigfileThe path to the signature file.
Returns
True if user allows install, signature valid.

Member Data Documentation

string NoteFly.GPGVerifyWrapper.gpgerror
private
string NoteFly.GPGVerifyWrapper.gpgoutput
private
Process NoteFly.GPGVerifyWrapper.gpgproc
private
const string NoteFly.GPGVerifyWrapper.GPGSIGNATUREEXTENSION = ".sig"