IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Développement Web en Java Discussion :

HTTPClient & SSL : could not find trusted certificate


Sujet :

Développement Web en Java

  1. #1
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut HTTPClient & SSL : could not find trusted certificate
    Salut,

    j'essai d'établir une connexion avec un serveur HTTPS pour y créer des répertoires.

    La fonction :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
        public static String creer_rep(String hote, String login, String password, String chemin, String nom_repertoire) {
            try {
            //Configuration de l'hôte
            HostConfiguration hostConfig = new HostConfiguration();
            Protocol easyhttps = new Protocol("https",(ProtocolSocketFactory) new EasySSLProtocolSocketFactory(),443);
            Protocol.registerProtocol("https", easyhttps);
            hostConfig.setHost(hote, 443, easyhttps);
            //On défini un HttpConnectionManager, qui permet de gérer les connexions, et éventuellement le multithreading 
            HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
            HttpConnectionManagerParams params = new HttpConnectionManagerParams();
            int maxHostConnections = 20;
            params.setMaxConnectionsPerHost(hostConfig, maxHostConnections);
            connectionManager.setParams(params);
            //On créé l'objet HttpClient et on lui passe les données d'authentification 
            HttpClient client = new HttpClient(connectionManager);
            client.setHostConfiguration(hostConfig);
            Credentials creds2 = new UsernamePasswordCredentials(login,password);
            client.getState().setCredentials(AuthScope.ANY, creds2);
     
            //Création du répertoire via la méthode MKCOL
            EntityEnclosingMethod mkcol = new EntityEnclosingMethod(chemin + nom_repertoire){
                public String getName() { return "MKCOL"; }
            };
            client.executeMethod(mkcol);
            System.out.println("Répertoire " + chemin + nom_repertoire + " créé avec succès.");
            mkcol.releaseConnection();
     
            return "OK";
            }
            catch(IOException ioe) {
                ioe.printStackTrace();
                return ioe.toString();
            }
        }
    J'essai d'accepter tous les certificats "self-signed" grâce à la classe EasySSLProtocolSocketFactory fournit par Apache.

    J'obtiens :

    javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate
    Si je tente d'intégrer le chargement du certificat dans la classe EasySSLProtocolSocketFactory :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
         private static SSLContext createEasySSLContext() {
              try {
                Provider provider = Security.getProvider("SUN");
                KeyStore keyStore = KeyStore.getInstance("jks",provider);
                FileInputStream walletFile = new FileInputStream("/ORA/db001/syscontrol/etc/WALLETS/rdbms/cwallet.sso");
                keyStore.load(walletFile,"".toCharArray());
                walletFile.close();
                SSLContext context = SSLContext.getInstance("SSL");
                context.init(null, new TrustManager[] { new EasyX509TrustManager(keyStore) }, null);
                return context;
              } catch (Exception e) {
                   throw new HttpClientError(e.toString());
              }
         }
    J'obtiens :

    org.apache.commons.httpclient.HttpClientError: java.io.IOException: Invalid keystore format
    Le code run dans la base de données (Oracle 10G R2, JVM intégrée v1.4).

    Si quelqu'un à une idée, mois je ne sais plus quoi faire.

    Merci !

  2. #2
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    d'après la doc de common httpclient, l'utilisation d'un socketfactory custom se fait par

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Protocol myhttps = new Protocol("https", new EasySSLProtocolSocketFactory(), 443);
    HttpClient httpclient = new HttpClient();
    httpclient.getHostConfiguration().setHost("www.whatever.com", 443, myhttps);

  3. #3
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Hmm c'est ce que je fais non ?

    Merci pour la réponse.

    J'ai quand même retesté en simplifiant comme ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
        public static String creerRepertoireDFS(String chemin, String nom_repertoire) {
           try
           {
                Protocol myhttps = new Protocol("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 443);
                HttpClient client = new HttpClient();
                client.getHostConfiguration().setHost("truc.cern.ch", 443, myhttps);
                Credentials creds2 = new UsernamePasswordCredentials("mon_login","mon_password");
                client.getState().setCredentials(AuthScope.ANY, creds2);
                EntityEnclosingMethod mkcol = new EntityEnclosingMethod(chemin + nom_repertoire){
                    public String getName() { return "MKCOL"; }
                };
                client.executeMethod(mkcol);
                System.out.println("Répertoire " + chemin + nom_repertoire + " créé avec succès.");
                mkcol.releaseConnection();
     
               return "OK";
           }
           catch(IOException ioe) {
               ioe.printStackTrace();
               return ioe.toString();
           }
        }
    et toujours pareil :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate

  4. #4
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    quand tu accède à la page depuis le browser, il te dit quoi?

  5. #5
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Le code Java run dans la base de données. La fonction PL/SQL qui appel la fonction Java est la suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    create or replace
    function creer_dossier_dfs(chemin in varchar2, nom_rep in varchar2) return varchar2
    AS LANGUAGE JAVA NAME 'project1.AccesDFS.creerRepertoireDFS(java.lang.String, java.lang.String) return java.lang.String';
    L'application est une application Oracle ApEx. J'exécute simplement la fonction comme ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    DECLARE
      v_Return VARCHAR2(200);
    BEGIN
      v_Return := CREER_DOSSIER_DFS('https://truc.cern.ch/dfs/rep1/rep2/rep3/', 'rep_test');
      HTP.P('v_Return = ' || v_Return);
    END;
    et donc dans la page j'obtiens simplement l'affichage :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    v_Return = javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate
    J'obtient la même chose lorsque j'exécute la fonction CREER_DOSSIER_DFS depuis SQLDeveloper.

    Merci d'essayer de m'aider

  6. #6
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    oui mais que te dit ton browser quand tu tente d'accéder à https://truc.cern.ch/dfs/rep1/rep2/rep3/

    Il te dit quoi à propos du certificat. J'ai l'impression que ton serveur n'utilise pas un certificat autosigné (que EasySSLProtocolSocketFactory devrait accepter) mais qu'il n'a simplement pas de signature (ce qui le rend inutilisable). Donc le browser te dit quoi
    -> pas signé
    -> signé mais non vérifiable
    -> signé mais pour un autre site
    ?

  7. #7
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Lorsque je tente directement d'accéder à l'adresse via le navigateur, il y a simplement une popup pour se logguer. Je rentre mon login/password et j'accède bien au contenu.

    Si je clic sur le petit cadenas j'obtiens pas mal d'infos sur le certificat mais aucune indication sur le fait qu'il soit signé ou non ?

    Tu peux tester par toi même : https://dfs.cern.ch/dfs/
    On a notre propre autorité de certification : https://ca.cern.ch/ca/

    Excuse mon ignorance, c'est la première fois que je travail avec les certificats.

  8. #8
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    jav est à jour sur votre serveur oracle? Je viens de tester le site que tu mentionne, le certificat SSL n'est pas émis par le cern mais bien par verisign, hors java reconnais verisign. Seule particuarité, le certificat racine de verisign en question date de Mars 2009, ce qui fait que si java n'a plus été mis à jour depuis 2 ans sur ce serveur, ses certificats sont périmés et il ne reconnais pas le nouveau certif de verisign.

    Voilà pour l'erreur, maintenant, partant du principe que le certificat n'est pas reconnu, je ne vois pas pourquoi ton handler n'entre pas en jeu.

    Une solution alternative serait d'ajouter le certificate racine de verisign au cacert java sur le servuer où se trouve ton oracle, une doc est founie sur ce site sur comment ajouter des certificats racine:

    http://mindprod.com/jgloss/rootcertificate.html

    tu n'aurais alors plus besoin d'un handle specifique et donc ne mettrais plus en danger la sécurité.

  9. #9
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Merci pour l'explication.

    Dans ce cas ça pourrait s'expliquer par le fait que j'exécute le code dans une base Oracle 10g, dont la version de Java intégrée est 1.4, donc plus mise à jour depuis un bon moment.

    Je n'ai aucun accès au serveur, tous ce que j'ai c'est un droit de "read" sur les fichiers cwallet.sso et ewallet.p12 sur le serveur...

    Si vraiment il n'y a pas d'autre solution je vais voir pour mettre en place un web service, de manière à ce que le code ne s'exécute pas dans la base :/

    Ce qui est bizarre c'est que lorsque je n'utilise pas HTTPClient, et que j'implémente mon propre "TrustManager" pour tout accepter, ça marche :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
         public static TrustManager[] getAllTrustingTrustManager(){
             return new TrustManager[]{
                 new X509TrustManager(){
                     public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){
                         return true;
                     }
                     public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){
                         return true;
                     }
                     public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){
                         return true;
                     }
                     public java.security.cert.X509Certificate[] getAcceptedIssuers() {
                         return null;
                     }
                     public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
                     public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
                 }
             };
         }
     
        public static void lister(String hote, String login, String password) {
            BufferedReader reader = null;
            try {
                URL url = new URL("https://dfs.cern.ch/dfs/rep1/rep2/rep3/command.txt");
                TrustManager[] trustManagerArray = getAllTrustingTrustManager();
                SSLContext sslContext = SSLContext.getInstance("TLS");
                sslContext.init(null, trustManagerArray, null);
                HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
                Authenticator.setDefault(new Authentification(login,password));
                HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
                reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
     
                String ligne;                     
                while ((ligne = reader.readLine()) != null)     
                    System.out.println("\t"+ligne);        
                System.out.println("\n\nEND!!");
            }
            catch(KeyManagementException e){e.printStackTrace();}
            catch(NoSuchAlgorithmException e2){e2.printStackTrace();}
            catch(MalformedURLException e3){e3.printStackTrace();}
            catch(IOException e4){e4.printStackTrace();}
        }
    Le contenu du fichier est bien listé.

  10. #10
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    par curiosité, tu pourrais donner le stacktrace complet de l'erreur?

  11. #11
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Hmm je n'ai pas de stacktrace, quand j'exécute en local depuis jDeveloper ca fonctionne, le répertoire est créé.

    Depuis la bdd le printstacktrace n'affiche rien évidement, il faudrait que je retourne sa valeur et que je l'affiche avec htp.p depuis le programme PL/SQL.

    Je fais ça demain si tu veux, le je vais devoir y aller.

  12. #12
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    en général le stacktrace et la première source d'information. Si ça tombe l'erreur a lieu totalement ailleurs

  13. #13
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Je te met ça demain sans faute.

    merci encore pour ton aide

  14. #14
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Comme promis, le printstacktrace :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate
    	at com.sun.net.ssl.internaSSLSocketImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
    	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    	at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
    	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
    	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    	at project1.AccesDFS.creerRepertoireDFS(AccesDFS:125)
    Caused by: java.security.cert.CertificateException: Could not find trusted certificate
    	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(DashoA6275)
    	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275)
    	at project1.EasyX509TrustManager.checkServerTrusted(EasyX509TrustManager:68)
    	at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275)
    	... 17 more

  15. #15
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Par contre je viens d'avoir une idée

    J'ai modifié la classe EasyX509TrustManager pour y intégrer la méthode getAllTrustingTrustManager(), j'ai donc remplacé :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    TrustManagerFactory factory = TrustManagerFactory.getInstance("SunX509");
    factory.init(keystore);
    TrustManager[] trustmanagers = factory.getTrustManagers();
    Par :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    TrustManager[] trustmanagers = getAllTrustingTrustManager();
    Et ça fonctionne !!!

    Par contre niveau sécurité tu en penses quoi ?

  16. #16
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    que c'est un trous. Puisque tu ne vérifie plus aucun certificat avec ce code, un serveur rogue qui présenterait un certificat invalide ne serait pas détecté et t'y enverrais joyeusement tes crédential. En gros c'est pas plus secure que de travailler en http.

  17. #17
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    C'est ce que je pensais :/

    Mais le serveur je le connais, et l'adresse sera toujours la même.

    Pour l'instant je laisse comme ça et je verrai si l'admin bronche ! Car de toutes façons tout ce que j'ai essayé d'autre ne fonctionne pas.

    Merci !

  18. #18
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    vous pensez le connaitre, le problème c'est si un pirate en installe un entre les deux et utilise du hack DNS ou ARP pour prendre sa place. LA solution propre serait, dans votre implémentation, de checker les certificat à la main

    Mais je reste à la abase pour l'option "mettez à jour ces p*** de certificats racine" on trouv des procédures sur le web pour le faire sans grande difficulté

    Vous pouriez même etre sournois et le faire vous même en java au nez à et à la barde de l'admin

  19. #19
    Membre régulier
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Décembre 2006
    Messages
    255
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France

    Informations professionnelles :
    Activité : Consultant informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Décembre 2006
    Messages : 255
    Points : 100
    Points
    100
    Par défaut
    Checker les certificats à la main ?

    Je t'avou que je n'ai quand même pas très bien compris pourquoi il me sort un "Invalid Keystore Format" quand j'essai d'utiliser ce foutu certificat.

    Plusieurs application utilisent ce fichier cwallet.sso et elles fonctionnent.

    En tous cas jamais j'aurais pensé que c'était aussi chiant à gérer ces certificats.

  20. #20
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    parce qu'il n'est pas dans le format sun ^^


    D'après plusieurs sites sur internet

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Security.addProvider(new oracle.security.pki.OraclePKIProvider());
    KeyStore keyStore = KeyStore.getInstance("SSO","OraclePKI");
    FileInputStream walletFile = new FileInputStream("/path_to_wallet/cwallet.sso");
    keyStore.load(walletFile,"");

Discussions similaires

  1. Réponses: 3
    Dernier message: 28/03/2014, 08h13
  2. [Hibernate] : Erreur Could not find datasource
    Par tipaquo dans le forum Hibernate
    Réponses: 2
    Dernier message: 12/10/2005, 10h43
  3. [3.1][Debian]problème de Could not find library 'swt-pi-gtk
    Par zlavock dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 27/09/2005, 13h07
  4. Réponses: 6
    Dernier message: 17/04/2005, 10h58
  5. Réponses: 3
    Dernier message: 30/03/2005, 23h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo