tbsGen.setSubject(subject);
try { tbsGen.setSubject(new X509Principal(subject.getEncoded())); } catch (IOException e) { throw new IllegalArgumentException("can't process principal: " + e); }
    public void setSubjectDN(        X509Name   subject)    {        tbsGen.setSubject(subject);    }