예제 #1
0
        /**
         * Makes a copy of this <code>PKIXParameters</code> object. Changes to the
         * copy will not affect the original and vice versa.
         *
         * @return a copy of this <code>PKIXParameters</code> object
         */
        public override object Clone()
        {
            PkixBuilderParameters parameters = new PkixBuilderParameters(
                GetTrustAnchors(), GetTargetCertConstraints());

            parameters.SetParams(this);
            return(parameters);
        }
예제 #2
0
        /**
         * Returns an instance of <code>PkixBuilderParameters</code>.
         * <p>
         * This method can be used to get a copy from other
         * <code>PKIXBuilderParameters</code>, <code>PKIXParameters</code>,
         * and <code>ExtendedPKIXParameters</code> instances.
         * </p>
         *
         * @param pkixParams The PKIX parameters to create a copy of.
         * @return An <code>PkixBuilderParameters</code> instance.
         */
        public static PkixBuilderParameters GetInstance(
            PkixParameters pkixParams)
        {
            PkixBuilderParameters parameters = new PkixBuilderParameters(
                pkixParams.GetTrustAnchors(),
                new X509CertStoreSelector(pkixParams.GetTargetCertConstraints()));

            parameters.SetParams(pkixParams);
            return(parameters);
        }