internal byte[][] Encode() { // Per RFC 5280 section 4.1.2.2 (https://tools.ietf.org/html/rfc5280#section-4.1.2.2) // serial number must be an unsigned integer. return(DerEncoder.ConstructSegmentedSequence( DerEncoder.ConstructSegmentedSequence(GeneralNames.First().Encode()), DerEncoder.SegmentedEncodeUnsignedInteger(SerialNumber))); }