20#ifndef KIGIT_SSH_KEYS_H_
21#define KIGIT_SSH_KEYS_H_
41 const wxString& aHomeDir );
58 const wxString& aSSHCommand = wxEmptyString );
#define APIEXPORT
Macros which export functions from a DLL/DSO.
APIEXPORT wxString PrivateKeyPath(const wxString &aPicked)
The private key for a path picked in a file dialog, which may be the key's .pub file.
APIEXPORT bool IsOfferableSSHKey(const wxString &aKey)
Whether aKey can be offered to a server.
APIEXPORT wxString EnsurePublicKeyFile(const wxString &aKey)
PublicKeyPath for aKey, first writing a public key file to KiCad's cache when the key has no ....
APIEXPORT wxString RememberedSSHKey(const wxString &aRemote)
The key that last connected to aRemote, or empty.
APIEXPORT std::vector< wxString > ParseSSHCommandIdentityFiles(const wxString &aCommand, const wxString &aHomeDir)
The -i key files in an ssh command line such as git's core.sshCommand, in order.
APIEXPORT std::vector< wxString > ParseSSHConfigIdentityFiles(const wxString &aConfigText, const wxString &aHost, const wxString &aHomeDir)
The IdentityFile entries an ssh config gives aHost, in file order.
APIEXPORT wxString PublicKeyPath(const wxString &aKey)
The public key file to offer with aKey.
APIEXPORT void SetDerivedPublicKeyFolder(const wxString &aDir)
Keep public key files written by EnsurePublicKeyFile in aDir.
APIEXPORT std::vector< wxString > DefaultSSHKeyCandidates(const wxString &aHomeDir, const wxString &aHost, const wxString &aSSHCommand=wxEmptyString)
Private keys to offer aHost, best first.
APIEXPORT wxString HomeDir()
The user's home folder, where ssh looks for its config and default keys: the first candidate with a ....
APIEXPORT wxString SSHKeyFolder()
The folder ssh keeps keys in, for a file picker to open at. Empty when the home folder is unknown.
APIEXPORT void RememberSSHKey(const wxString &aRemote, const wxString &aKey)
Remember aKey as the key that connected to aRemote. Safe to call from any thread.
APIEXPORT std::vector< wxString > HomeDirCandidates()
The folders that may be the user's home, most likely first.
APIEXPORT void SetRememberedSSHKeyStore(const wxString &aPath)
Keep remembered keys in aPath.
APIEXPORT std::string PublicKeyBlob(const wxString &aKey)
The public key blob from aKey's public key file, as the server sees it, or empty when it cannot be re...
APIEXPORT bool IsSameSSHKey(const wxString &aKey, const wxString &aOther)
Whether two key paths name the same file.