// Restrictions apply only when the specified name form is present.
// If no name of the type is in the certificate,
// the certificate is acceptable (rfc 3280).
GeneralName [] name_constraints = new GeneralName[] {
new GeneralName(1, "822.Name"),
new GeneralName(1, "rfc@822.Name"),
new GeneralName(2, "Name.org"),
new GeneralName(2, "dNS.Name.org"),
//new GeneralName(4, "O=Organization"),
new GeneralName(6, "http://.Resource.Id"),
new GeneralName(6, "http://uniform.Resource.Id"),
new GeneralName(7, "1.1.1.1"),
// new GeneralName(7, new byte[] {1, 1, 1, 1, 3, 3, 3, 3}),
new GeneralName(new byte[] {1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1}),
// new GeneralName(7, new byte[] {1, 1, 1, 1, 1, 1, 1, 1,
// 1, 1, 1, 1, 1, 1, 1, 1,
// 3, 3, 3, 3, 3, 3, 3, 3,
// 3, 3, 3, 3, 3, 3, 3, 3})
};
// names which should match divided from names which should not
// match by null
GeneralName[][] alternative_names = new GeneralName[][] {
{
new GeneralName(1, "rfc@822.Name"),
null,
new GeneralName(1, "rfc@Other.Name")
}, {
new GeneralName(1, "rfc@822.Name"),
null,
new GeneralName(1, "rfc@Other.Name")
}, {
new GeneralName(2, "Name.org"),
new GeneralName(2, "dNS.Name.org"),
null,
new GeneralName(2, "dNS.OtherName.org")
}, {
new GeneralName(2, "dNS.Name.org"),
null,
new GeneralName(2, "Name.org"),
new GeneralName(2, "dNS.OtherName.org")
}, {
// new GeneralName(4, "O=Organization"),
// null,
// new GeneralName(4, "O=OtherOrganization")
//}, {
new GeneralName(6, "http://uniform.Resource.Id/location"),
null,
//new GeneralName(6, "http://Resource.Id")
}, {
new GeneralName(6, "http://uniform.Resource.Id"),
null,
new GeneralName(6, "http://Resource.Id")
}, {
new GeneralName(new byte[] {1, 1, 1, 1}),
null,
new GeneralName(new byte[] {2, 2, 2, 2})
// }, {
// new GeneralName(7, new byte[] {1, 1, 1, 1}),
// new GeneralName(7, new byte[] {2, 2, 2, 2}),
// new GeneralName(7, new byte[] {3, 3, 3, 3}),
// null,
// new GeneralName(7, new byte[] {4, 4, 4, 4})
}, {
new GeneralName(new byte[] {1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1}),
null,
new GeneralName(new byte[] {2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2}),
// }, {
// new GeneralName(7, new byte[] {1, 1, 1, 1, 1, 1, 1, 1,
// 1, 1, 1, 1, 1, 1, 1, 1}),
// new GeneralName(7, new byte[] {2, 2, 2, 2, 2, 2, 2, 2,