package org.bouncycastle.tls;

/**
 * RFC 6066
 */
public class IdentifierType
{
    public static final short pre_agreed = 0;
    public static final short key_sha1_hash = 1;
    public static final short x509_name = 2;
    public static final short cert_sha1_hash = 3;

    public static String getName(short identifierType)
    {
        switch (identifierType)
        {
        case pre_agreed:
            return "pre_agreed";
        case key_sha1_hash:
            return "key_sha1_hash";
        case x509_name:
            return "x509_name";
        case cert_sha1_hash:
            return "cert_sha1_hash";
        default:
            return "UNKNOWN";
        }
    }
}

@@ -674,11 +674,148 @@
  %7D%0A    %7D
+%0A%0A    public static String getText(short identifierType)%0A    %7B%0A        return getName(identifierType) + %22(%22 + identifierType + %22)%22;%0A    %7D
 %0A%7D%0A

Add getText method