boolean selectSubjectId(byte[] data, short offset, short length) {
        if(currentCertSubjectId[0] == 0) {
            if(rootCertHolderReference != null && rootCertHolderReference[0] == (byte)length) {
                if(Util.arrayCompare(rootCertHolderReference, (short)1, data, offset, length) == 0) {
                    setupCurrentKey(rootCertHolderReference, rootCertPublicKeyData, rootCertAuthorization, rootCertEffDate, rootCertExpDate);
                    currentCertNum[0] = CERT_ROOT;
                    return true;
                }
            }else if(altCertHolderReference != null && altCertHolderReference[0] == (byte)length) {
                if(Util.arrayCompare(altCertHolderReference, (short)1, data, offset, length) == 0) {
                  setupCurrentKey(altCertHolderReference, altCertPublicKeyData, altCertAuthorization, altCertEffDate, altCertExpDate);
                  currentCertNum[0] = CERT_ALT;
                  return true;
                }
            }
            return false;
        }
        return length == currentCertSubjectId[0] && Util.arrayCompare(currentCertSubjectId, (short) 1, data, offset,
                length) == 0;
    }