/// <summary> /// Compares this certification path for equality with the specified /// object. Two {@code CertPath}s are equal if and only if their /// types are equal and their certificate {@code List}s (and by /// implication the {@code Certificate}s in those {@code List}s) /// are equal. A {@code CertPath} is never equal to an object that is /// not a {@code CertPath}. /// <para> /// This algorithm is implemented by this method. If it is overridden, /// the behavior specified here must be maintained. /// /// </para> /// </summary> /// <param name="other"> the object to test for equality with this certification path </param> /// <returns> true if the specified object is equal to this certification path, /// false otherwise </returns> public override bool Equals(Object other) { if (this == other) { return(true); } if (!(other is CertPath)) { return(false); } CertPath otherCP = (CertPath)other; if (!otherCP.Type.Equals(Type_Renamed)) { return(false); } //JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET: //ORIGINAL LINE: java.util.List<? extends Certificate> thisCertList = this.getCertificates(); IList <?> thisCertList = this.Certificates; //JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET: //ORIGINAL LINE: java.util.List<? extends Certificate> otherCertList = otherCP.getCertificates(); IList <?> otherCertList = otherCP.Certificates; return(thisCertList.Equals(otherCertList)); }
/// <summary> /// Creates an instance of {@code PKIXCertPathBuilderResult} /// containing the specified parameters. /// </summary> /// <param name="certPath"> the validated {@code CertPath} </param> /// <param name="trustAnchor"> a {@code TrustAnchor} describing the CA that /// served as a trust anchor for the certification path </param> /// <param name="policyTree"> the immutable valid policy tree, or {@code null} /// if there are no valid policies </param> /// <param name="subjectPublicKey"> the public key of the subject </param> /// <exception cref="NullPointerException"> if the {@code certPath}, /// {@code trustAnchor} or {@code subjectPublicKey} parameters /// are {@code null} </exception> public PKIXCertPathBuilderResult(CertPath certPath, TrustAnchor trustAnchor, PolicyNode policyTree, PublicKey subjectPublicKey) : base(trustAnchor, policyTree, subjectPublicKey) { if (certPath == null) { throw new NullPointerException("certPath must be non-null"); } this.CertPath_Renamed = certPath; }
/// <summary> /// Validates the specified certification path using the specified /// algorithm parameter set. /// <para> /// The {@code CertPath} specified must be of a type that is /// supported by the validation algorithm, otherwise an /// {@code InvalidAlgorithmParameterException} will be thrown. For /// example, a {@code CertPathValidator} that implements the PKIX /// algorithm validates {@code CertPath} objects of type X.509. /// /// </para> /// </summary> /// <param name="certPath"> the {@code CertPath} to be validated </param> /// <param name="params"> the algorithm parameters </param> /// <returns> the result of the validation algorithm </returns> /// <exception cref="CertPathValidatorException"> if the {@code CertPath} /// does not validate </exception> /// <exception cref="InvalidAlgorithmParameterException"> if the specified /// parameters or the type of the specified {@code CertPath} are /// inappropriate for this {@code CertPathValidator} </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public final CertPathValidatorResult validate(CertPath certPath, CertPathParameters params) throws CertPathValidatorException, java.security.InvalidAlgorithmParameterException public CertPathValidatorResult Validate(CertPath certPath, CertPathParameters @params) { return(ValidatorSpi.EngineValidate(certPath, @params)); }