Changeset 5386 for branches


Ignore:
Timestamp:
01/17/12 16:57:56 (8 years ago)
Author:
rafaelraymundo
Message:

Ticket #2451 - Erro no login com certificado, verificação cas.

Location:
branches/2.3/security
Files:
7 added
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/security/ExpressoCert/src/br/gov/serpro/cert/DigitalCertificate.java

    r5276 r5386  
    483483            return null; 
    484484        } 
    485  
     485         
    486486        Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); 
    487487 
     
    837837 
    838838            if (this.setup.getParameter("debug").equalsIgnoreCase("true")) { 
    839                 System.out.println("\nthis.cert: "+Base64Utils.der2pem(this.cert.getEncoded())+"\n"); 
     839                System.out.println("\nthis.cert: "+ this.getPEMCertificate()+"\n"); 
    840840            } 
    841841 
    842             httppost.addParameter("certificado", Base64Utils.der2pem(this.cert.getEncoded())); 
     842            httppost.addParameter("certificado", this.getPEMCertificate()); 
    843843            httpclient.executeMethod(httppost); 
    844844            resposta = httppost.getResponseBodyAsString().split(CRLF); 
     
    976976    public String getPEMCertificate() throws CertificateEncodingException { 
    977977        if (this.cert != null){ 
    978             return Base64Utils.der2pem(this.cert.getEncoded()); 
     978            return Base64Utils.der2pem(this.cert.getEncoded(), true); 
    979979        } 
    980980        return null; 
  • branches/2.3/security/ExpressoCert/src/br/gov/serpro/setup/Setup.java

    r5152 r5386  
    145145    Locale buildLocale(String localeCode) { 
    146146 
    147         String[] localeItems = localeCode.split("_"); 
     147        String splitter = localeCode.indexOf('_') != -1 ? "_" : "-" ; 
     148        String[] localeItems = localeCode.split(splitter); 
    148149        Locale locale; 
    149150 
     
    168169    public void addLanguageResource(String langResource) { 
    169170        System.out.println("registrando recurso de linguagem " + langResource); 
    170         langResources.put(langResource, ResourceBundle.getBundle(langResource, currentLocale)); 
     171        langResources.put(langResource, ResourceBundle.getBundle("br.gov.serpro.i18n."+langResource, currentLocale)); 
    171172    } 
    172173 
  • branches/2.3/security/ExpressoCert/src/br/gov/serpro/util/Base64Utils.java

    r5152 r5386  
    144144 
    145145        String beginCertificate = "-----BEGIN CERTIFICATE-----" +CRLF; 
    146         String endCertificate = "-----END CERTIFICATE-----"; 
     146        String endCertificate = "-----END CERTIFICATE-----" +CRLF; 
    147147 
    148148        if (isCert){ 
  • branches/2.3/security/ExpressoCertMail/src/ExpressoSmimeApplet.java

    r1174 r5386  
    3131                this.setSize(1, 1); 
    3232                this.setup = new Setup(this); 
    33         this.setup.addLanguageResource("ExpressoCertMailMessages"); 
     33                this.setup.addLanguageResource("ExpressoCertMailMessages"); 
    3434                this.dataReader = new Javascript2AppletPassingData(); 
    3535                // this.paramReaderThread = new ParamReaderThread(JSObject.getWindow(this), dataReader, setup); 
Note: See TracChangeset for help on using the changeset viewer.