public BasicConstraints( bool cA) { if (cA) { this.cA = DerBoolean.True; } }
private BasicConstraints( Asn1Sequence seq) { if (seq.Count > 0) { if (seq[0] is DerBoolean) { this.cA = DerBoolean.GetInstance(seq[0]); } else { this.pathLenConstraint = DerInteger.GetInstance(seq[0]); } if (seq.Count > 1) { if (this.cA == null) throw new ArgumentException("wrong sequence in constructor", "seq"); this.pathLenConstraint = DerInteger.GetInstance(seq[1]); } } }
/** * create a cA=true object for the given path length constraint. * * @param pathLenConstraint */ public BasicConstraints( int pathLenConstraint) { this.cA = DerBoolean.True; this.pathLenConstraint = new DerInteger(pathLenConstraint); }