49 lines
914 B
C#
49 lines
914 B
C#
using System;
|
|
using Novell.SecretStore.NSSSWrapper;
|
|
|
|
namespace Novell.SecretStore.NSSSWrapper
|
|
{
|
|
/// <summary>
|
|
/// Summary description for RemoteStore.
|
|
/// </summary>
|
|
public class RemoteStore
|
|
{
|
|
|
|
NativeCalls nc = null;
|
|
|
|
public RemoteStore()
|
|
{
|
|
//
|
|
// TODO: Add constructor logic here
|
|
//
|
|
}
|
|
|
|
public static RemoteStore getInstance()
|
|
{
|
|
RemoteStore rs = new RemoteStore();
|
|
return rs;
|
|
}
|
|
|
|
public void connect(string sHost, string sUserID, string sPassword, string sCertFile)
|
|
{
|
|
nc = new NativeCalls(sHost, sUserID, sPassword, sCertFile);
|
|
nc.getStoreInfo();
|
|
}
|
|
|
|
public string[] enumerateSecrets()
|
|
{
|
|
return nc.enumerateSecretIDs();
|
|
}
|
|
|
|
public RemoteSecret getSecret(string sSecretID)
|
|
{
|
|
return nc.getSecret(0, sSecretID);
|
|
}
|
|
|
|
public void setSecret(RemoteSecret secret)
|
|
{
|
|
nc.setSecret(secret);
|
|
}
|
|
}
|
|
}
|