Esempio n. 1
0
        internal override CertificateImplementationType _getType()
        {
            CertificateImplementationType ret = (CertificateImplementationType)RCFProtoPINVOKE.X509Certificate__getType(swigCPtr);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 2
0
        /// <summary>
        /// Attempts to locate a root certificate for this certificate, in the given certificate store. Returns the root certificate if found, and otherwise null.
        /// </summary>
        public Win32Certificate FindRootCertificate(Win32CertificateLocation certStoreLocation, Win32CertificateStore certStore)
        {
            IntPtr           cPtr = RCFProtoPINVOKE.Win32Certificate_findRootCertificate(swigCPtr, (int)certStoreLocation, (int)certStore);
            Win32Certificate ret  = (cPtr == IntPtr.Zero) ? null : new Win32Certificate(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 3
0
        /// <summary>
        /// Returns the thread pool the server is using.
        /// </summary>
        public ThreadPool GetThreadPool()
        {
            IntPtr     cPtr = RCFProtoPINVOKE.RcfProtoServer_getThreadPool(swigCPtr);
            ThreadPool ret  = (cPtr == IntPtr.Zero) ? null : new ThreadPool(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 4
0
        /// <summary>
        /// Returns the current certificate.
        /// </summary>
        public Win32Certificate Current()
        {
            IntPtr           cPtr = RCFProtoPINVOKE.StoreCertificateIterator_current(swigCPtr);
            Win32Certificate ret  = (cPtr == IntPtr.Zero) ? null : new Win32Certificate(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 5
0
        internal X509Certificate _downcastToX509Certificate(Certificate certPtr)
        {
            IntPtr          cPtr = RCFProtoPINVOKE.Certificate__downcastToX509Certificate(swigCPtr, Certificate.getCPtr(certPtr));
            X509Certificate ret  = (cPtr == IntPtr.Zero) ? null : new X509Certificate(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 6
0
        public static TransportProtocolList Repeat(TransportProtocol value, int count)
        {
            IntPtr cPtr = RCFProtoPINVOKE.TransportProtocolList_Repeat((int)value, count);
            TransportProtocolList ret = (cPtr == IntPtr.Zero) ? null : new TransportProtocolList(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 7
0
        public TransportProtocolList GetRange(int index, int count)
        {
            IntPtr cPtr = RCFProtoPINVOKE.TransportProtocolList_GetRange(swigCPtr, index, count);
            TransportProtocolList ret = (cPtr == IntPtr.Zero) ? null : new TransportProtocolList(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 8
0
        /// <summary>
        /// Gets the certificate authority for the channel.
        /// </summary>
        public Certificate GetCaCertificate()
        {
            IntPtr      cPtr = RCFProtoPINVOKE.RcfProtoChannel_getCaCertificate(swigCPtr);
            Certificate ret  = (cPtr == IntPtr.Zero) ? null : new Certificate(cPtr, true);

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 9
0
 /// <summary>
 /// Starts the RCFProto server.
 /// </summary>
 public void Start()
 {
     if (mCallbackTable == null)
     {
         mCallbackTable = new SwigCallback_ServerRpc(this);
     }
     RCFProtoPINVOKE.RcfProtoServer_start(swigCPtr);
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 10
0
 public virtual void Run()
 {
     if (SwigDerivedClassHasMethod("Run", swigMethodTypes0))
     {
         RCFProtoPINVOKE._SwigCallback_RunSwigExplicit_SwigCallback(swigCPtr);
     }
     else
     {
         RCFProtoPINVOKE._SwigCallback_Run(swigCPtr);
     }
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 11
0
 public virtual void ProtoRpcBegin(_SwigCallbackArgs args, RcfProtoServer server, RcfProtoSession context, string serviceName, int methodId)
 {
     if (SwigDerivedClassHasMethod("ProtoRpcBegin", swigMethodTypes1))
     {
         RCFProtoPINVOKE._SwigCallback_ProtoRpcBeginSwigExplicit_SwigCallback(swigCPtr, _SwigCallbackArgs.getCPtr(args), RcfProtoServer.getCPtr(server), RcfProtoSession.getCPtr(context), serviceName, methodId);
     }
     else
     {
         RCFProtoPINVOKE._SwigCallback_ProtoRpcBegin(swigCPtr, _SwigCallbackArgs.getCPtr(args), RcfProtoServer.getCPtr(server), RcfProtoSession.getCPtr(context), serviceName, methodId);
     }
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 12
0
 public virtual void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwnBase)
             {
                 swigCMemOwnBase = false;
                 RCFProtoPINVOKE.delete_Certificate(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
     }
 }
Esempio n. 13
0
 public virtual void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwn)
             {
                 swigCMemOwn = false;
                 RCFProtoPINVOKE.delete_RcfProtoChannel(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
     }
 }
Esempio n. 14
0
 public override void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwn)
             {
                 swigCMemOwn = false;
                 RCFProtoPINVOKE.delete_LogToDebugWindow(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
         base.Dispose();
     }
 }
Esempio n. 15
0
 public override void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwnDerived)
             {
                 swigCMemOwnDerived = false;
                 RCFProtoPINVOKE.delete_Win32Certificate(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
         base.Dispose();
     }
 }
Esempio n. 16
0
 private void SwigDirectorConnect()
 {
     if (SwigDerivedClassHasMethod("Run", swigMethodTypes0))
     {
         swigDelegate0 = new SwigDelegate_SwigCallback_0(SwigDirectorRun);
     }
     if (SwigDerivedClassHasMethod("ProtoRpcBegin", swigMethodTypes1))
     {
         swigDelegate1 = new SwigDelegate_SwigCallback_1(SwigDirectorProtoRpcBegin);
     }
     if (SwigDerivedClassHasMethod("ValidateCertificate", swigMethodTypes2))
     {
         swigDelegate2 = new SwigDelegate_SwigCallback_2(SwigDirectorValidateCertificate);
     }
     RCFProtoPINVOKE._SwigCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2);
 }
Esempio n. 17
0
 internal LogToDebugWindow(IntPtr cPtr, bool cMemoryOwn) : base(RCFProtoPINVOKE.LogToDebugWindow_SWIGUpcast(cPtr), cMemoryOwn)
 {
     swigCPtr = new HandleRef(this, cPtr);
 }
Esempio n. 18
0
 internal UnixLocalEndpoint(IntPtr cPtr, bool cMemoryOwn) : base(RCFProtoPINVOKE.UnixLocalEndpoint_SWIGUpcast(cPtr), cMemoryOwn)
 {
     swigCPtr = new HandleRef(this, cPtr);
 }
Esempio n. 19
0
 /// <summary>
 /// Loads a certificate from a .pfx file, using the given file path, password and certificate name.
 /// </summary>
 public PfxCertificate(string pathToCert, string password, string certName) : this(RCFProtoPINVOKE.new_PfxCertificate(pathToCert, password, certName), true)
 {
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 20
0
 /// <summary>
 /// Constructs a store iterator for the the given certificate location and store.
 /// </summary>
 public StoreCertificateIterator(Win32CertificateLocation certStoreLocation, Win32CertificateStore certStore) : this(RCFProtoPINVOKE.new_StoreCertificateIterator((int)certStoreLocation, (int)certStore), true)
 {
     if (RCFProtoPINVOKE.SWIGPendingException.Pending)
     {
         throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 21
0
 internal Win32Certificate(IntPtr cPtr, bool cMemoryOwn) : base(RCFProtoPINVOKE.Win32Certificate_SWIGSmartPtrUpcast(cPtr), true)
 {
     swigCMemOwnDerived = cMemoryOwn;
     swigCPtr           = new HandleRef(this, cPtr);
 }
Esempio n. 22
0
        public virtual bool ValidateCertificate(_SwigCallbackArgs args)
        {
            bool ret = (SwigDerivedClassHasMethod("ValidateCertificate", swigMethodTypes2) ? RCFProtoPINVOKE._SwigCallback_ValidateCertificateSwigExplicit_SwigCallback(swigCPtr, _SwigCallbackArgs.getCPtr(args)) : RCFProtoPINVOKE._SwigCallback_ValidateCertificate(swigCPtr, _SwigCallbackArgs.getCPtr(args)));

            if (RCFProtoPINVOKE.SWIGPendingException.Pending)
            {
                throw RCFProtoPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 23
0
 internal Win32NamedPipeEndpoint(IntPtr cPtr, bool cMemoryOwn) : base(RCFProtoPINVOKE.Win32NamedPipeEndpoint_SWIGUpcast(cPtr), cMemoryOwn)
 {
     swigCPtr = new HandleRef(this, cPtr);
 }