/** * Constructor from a given details. * * According RFC 3280, the minimum and maximum fields are not used with any * name forms, thus minimum MUST be zero, and maximum MUST be absent. * <p> * If minimum is <code>null</code>, zero is assumed, if * maximum is <code>null</code>, maximum is absent.</p> * * @param baseName * A restriction. * @param minimum * Minimum * * @param maximum * Maximum */ public GeneralSubtree( GeneralName baseName, BigInteger minimum, BigInteger maximum) { this.baseName = baseName; if (minimum != null) { this.minimum = new DerInteger(minimum); } if (maximum != null) { this.maximum = new DerInteger(maximum); } }
/** * Constructor. * @param roleAuthority the role authority of this RoleSyntax. * @param roleName the role name of this RoleSyntax. */ public RoleSyntax( GeneralNames roleAuthority, GeneralName roleName) { if (roleName == null || roleName.TagNo != GeneralName.UniformResourceIdentifier || ((IAsn1String)roleName.Name).GetString().Equals("")) { throw new ArgumentException("the role name MUST be non empty and MUST " + "use the URI option of GeneralName"); } this.roleAuthority = roleAuthority; this.roleName = roleName; }
/** * Constructor from Asn1TaggedObject. * * @param tagObj The tagged object. * @throws ArgumentException if the encoding is wrong. */ private Target( Asn1TaggedObject tagObj) { switch ((Choice)tagObj.TagNo) { case Choice.Name: // GeneralName is already a choice so explicit targetName = GeneralName.GetInstance(tagObj, true); break; case Choice.Group: targetGroup = GeneralName.GetInstance(tagObj, true); break; default: throw new ArgumentException("unknown tag: " + tagObj.TagNo); } }
/// <summary>Construct a GeneralNames object containing one GeneralName.</summary> /// <param name="name">The name to be contained.</param> public GeneralNames( GeneralName name) { names = new GeneralName[] { name }; }
public AuthorityInformationAccess( DerObjectIdentifier oid, GeneralName location) { this.descriptions = new AccessDescription[] { new AccessDescription(oid, location) }; }
public GeneralSubtree( GeneralName baseName) : this(baseName, null, null) { }
/** * Constructor from given details. * <p> * Exactly one of the parameters must be not <code>null</code>.</p> * * @param type the choice type to apply to the name. * @param name the general name. * @throws ArgumentException if type is invalid. */ public Target( Choice type, GeneralName name) : this(new DerTaggedObject((int)type, name)) { }
/** * Constructor. Invoking this constructor is the same as invoking * <code>new RoleSyntax(null, roleName)</code>. * @param roleName the role name of this RoleSyntax. */ public RoleSyntax( GeneralName roleName) : this(null, roleName) { }