PkixBuilderParameters
.
*
* This method can be used to get a copy from other
* PKIXBuilderParameters
, PKIXParameters
,
* and ExtendedPKIXParameters
instances.
*
PkixBuilderParameters
instance.
*/
public static PkixBuilderParameters GetInstance(
PkixParameters pkixParams)
{
PkixBuilderParameters parameters = new PkixBuilderParameters(
pkixParams.GetTrustAnchors(),
pkixParams.GetTargetConstraintsCert(),
pkixParams.GetTargetConstraintsAttrCert());
parameters.SetParams(pkixParams);
return parameters;
}
public PkixBuilderParameters(ISetISet
is null
an
/// empty set is assumed.
/// ExtendedPKIXBuilderParameters
and
* PKIXBuilderParameters
.
*
* @param params Parameters to set.
* @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
*/
protected override void SetParams(PkixParameters parameters)
{
base.SetParams(parameters);
if (parameters is PkixBuilderParameters _params)
{
maxPathLength = _params.maxPathLength;
excludedCerts = new HashSetPKIXParameters
object. Changes to the
* copy will not affect the original and vice versa.
*
* @return a copy of this PKIXParameters
object
*/
public override object Clone()
{
PkixBuilderParameters parameters = new PkixBuilderParameters(
GetTrustAnchors(),
GetTargetConstraintsCert(),
GetTargetConstraintsAttrCert());
parameters.SetParams(this);
return parameters;
}
public override string ToString()
{
StringBuilder s = new StringBuilder();
s.AppendLine("PkixBuilderParameters [");
s.Append(base.ToString());
s.Append(" Maximum Path Length: ");
s.Append(MaxPathLength);
s.AppendLine();
s.AppendLine("]");
return s.ToString();
}
}
}