Esempio n. 1
0
        /// <summary>
        /// Will deploy certificate from local file path given correct password for private key, and deploy to certificate store on remote server.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration FromFile(this IOfferSslInfrastructure sslInfra, string path, string password)
        {
            var infraBuilder = ((SslInfrastructureBuilder)sslInfra).InfrastructureBuilder;
            var certOp       = new CertificateFromFileOperation(path, password);

            Configure.Operation(infraBuilder, certOp);
            return(infraBuilder);
        }
Esempio n. 2
0
        /// <summary>
        /// Will deploy certificate found by find type and find value from the local certificate store, to remote certificate store on server.
        /// </summary>
        /// <param name="findType"></param>
        /// <param name="findValue"></param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration FromStore(this IOfferSslInfrastructure sslInfra, X509FindType findType, string findValue)
        {
            var infraBuilder = ((SslInfrastructureBuilder)sslInfra).InfrastructureBuilder;
            var certOp       = new CertificateFromStoreOperation(findType, findValue);

            Configure.Operation(infraBuilder, certOp);
            return(infraBuilder);
        }
Esempio n. 3
0
        /// <summary>
        /// Will deploy certificate from local file path given correct password for private key, and deploy to certificate store on remote server with provided options.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="password"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration FromFile(this IOfferSslInfrastructure sslInfra, string path, string password, Action <IOfferCertificateOptions> options)
        {
            var infraBuilder = ((SslInfrastructureBuilder)sslInfra).InfrastructureBuilder;
            var certOpt      = new CertificateOptions();

            options(certOpt);

            var certOp = new CertificateFromFileOperation(path, password, certOpt);

            OperationExecutor.Execute((RemoteBuilder)sslInfra, certOp);
            return(infraBuilder);
        }
Esempio n. 4
0
        /// <summary>
        /// Will deploy certificate found by find type and find value from the local certificate store, to remote certificate store on server with provided options.
        /// </summary>
        /// <param name="findType"></param>
        /// <param name="findValue"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IOfferRemoteConfiguration FromStore(this IOfferSslInfrastructure sslInfra, X509FindType findType, string findValue, Action <IOfferCertificateOptions> options)
        {
            var infraBuilder = ((SslInfrastructureBuilder)sslInfra).InfrastructureBuilder;
            var certOpt      = new CertificateOptions();

            options(certOpt);

            var certOp = new CertificateFromStoreOperation(findType, findValue, certOpt);

            OperationExecutor.Execute((RemoteBuilder)sslInfra, certOp);
            return(infraBuilder);
        }