SignerLocation ::= SEQUENCE {
countryName [0] DirectoryString OPTIONAL,
localityName [1] DirectoryString OPTIONAL,
postalAddress [2] PostalAddress OPTIONAL }
PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
DirectoryString ::= CHOICE {
teletexString TeletexString (SIZE (1..MAX)),
printableString PrintableString (SIZE (1..MAX)),
universalString UniversalString (SIZE (1..MAX)),
utf8String UTF8String (SIZE (1.. MAX)),
bmpString BMPString (SIZE (1..MAX)) }
ASN1EncodableVector v = new ASN1EncodableVector();
if (countryName != null)
{
v.add(new DERTaggedObject(true, 0, countryName));
}
if (localityName != null)
{
v.add(new DERTaggedObject(true, 1, localityName));
}
if (postalAddress != null)
{
v.add(new DERTaggedObject(true, 2, postalAddress));
}
return new DERSequence(v);