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

Sécurité Java Discussion :

[HttpClient] - Connexion et authentification forte en HTTPS


Sujet :

Sécurité Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Développeur Web
    Inscrit en
    Août 2008
    Messages
    28
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Août 2008
    Messages : 28
    Par défaut [HttpClient] - Connexion et authentification forte en HTTPS
    Bonjour,

    Je suis actuellement en train de développe une application JAVA qui doit se connecté sur un site web utilisant une authentification par certificat, via SSL.

    Le serveur est configuré afin de vérifié le certificat client. de cette manière :
    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
     
    <VirtualHost <mon_ip>:443>
     
        [...]
     
        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl.crt/<mon_certifcat_serveur>.cer
        SSLCertificateKeyFile /etc/apache2/ssl.key/<mon_certifcat_serveur_cle_prive>.key
        SSLCertificateChainFile /etc/apache2/ssl.crt/<mon_certifcat_serveur_racine>.cer
     
        <Location />
            SSLVerifyClient require
            SSLVerifyDepth 5
        </Location>
    </VirtualHost>
    Pour me connecter, je fais 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
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
     
    public class HttpsTest {
     
        public static void testSLLConection(File cert, String pass){
            try {
     
                InputStream certifinput = new FileInputStream(cert);
                KeyStore ks = KeyStore.getInstance("PKCS12");
                ks.load(certifinput, pass.toCharArray());
     
                System.out.println( "init Stores..." );
     
                KeyManagerFactory kmf = KeyManagerFactory.getInstance( "SunX509" );
                kmf.init( ks, pass.toCharArray());
     
                /*KeyStore jks = KeyStore.getInstance( "Windows-ROOT" );
                jks.load( null );
                TrustManagerFactory tmf = TrustManagerFactory.getInstance( "SunX509" );
                tmf.init( jks );
                */
     
                /*
                TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
                tmf.init((KeyStore)null);
                */
     
                /*
                TrustManager[] myTMs = new TrustManager [] {
                              new X509TrustStoreManager() };
                */
     
                TrustManager[] trustAllCerts = new TrustManager[]{
                    new X509TrustManager() {
                        @Override
                        public java.security.cert.X509Certificate[] getAcceptedIssuers() {
                            return null;
                        }
                        @Override
                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) {
                        }
                        @Override
                        public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) {
                        }
                    }
                };
     
                //"TLSv1", "SSLv3"
                SSLContext sslClientContext = SSLContext.getInstance("SSLv3");
                sslClientContext.init( kmf.getKeyManagers(), trustAllCerts, null );
     
                /* */
                SslContextedSecureProtocolSocketFactory secureProtocolSocketFactory = new SslContextedSecureProtocolSocketFactory(sslClientContext, false);
     
     
                Protocol.registerProtocol("https", new Protocol("https", (ProtocolSocketFactory)secureProtocolSocketFactory, 443));
     
                HttpClient httpClient = new HttpClient();
                httpClient.getParams().setParameter("http.tcp.nodelay", false);
                httpClient.getParams().setParameter("http.useragent", System.getProperty("http.agent")+" Java/"+System.getProperty("java.version"));
     
                GetMethod method = new GetMethod("<url_de_mon_site_en_https>");
                method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
                String reponse = "";
                int statusCode = -1;
                try {
                    statusCode = httpClient.executeMethod(method);
                    InputStream  in = method.getResponseBodyAsStream();
                    StringWriter writer = new StringWriter();
                    InputStreamReader streamReader = new InputStreamReader(in);
                    //le buffer permet le readline
                    BufferedReader buffer = new BufferedReader(streamReader);
                    String line="";
                    while ( null!=(line=buffer.readLine())){
                        writer.write(line);
                    }
                    reponse = writer.toString();
                } catch (Exception e){
                    e.printStackTrace();
                } finally {
                    System.out.print("response = " +HttpStatus.getStatusText(statusCode)+" - "+reponse);
                    method.releaseConnection();
                }
            } catch(Exception e){
                e.printStackTrace();
            }
        }
    }
    voici le code de la classe SslContextedSecureProtocolSocketFactory :
    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
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
     
    public class SslContextedSecureProtocolSocketFactory implements
            SecureProtocolSocketFactory {
        private SSLContext sslContext;
     
        /** Host name verify flag. */
        private boolean verifyHostname = true;
     
        /**
         * Constructor for SslContextedSecureProtocolSocketFactory.
         * 
         * @param sslContext
         *            The SSLContext to use for building the SSLSocketFactory. If
         *            this is null, then the default SSLSocketFactory is used.
         * @param verifyHostname
         *            The host name verification flag. If set to <code>true</code>
         *            the SSL sessions server host name will be compared to the host
         *            name returned in the server certificates "Common Name" field
         *            of the "SubjectDN" entry. If these names do not match a
         *            Exception is thrown to indicate this. Enabling host name
         *            verification will help to prevent from man-in-the-middle
         *            attacks. If set to <code>false</code> host name verification
         *            is turned off.
         * 
         *            Code sample:
         * 
         *            <blockquote> Protocol stricthttps = new Protocol( "https", new
         *            SslContextedSecureProtocolSocketFactory(sslContext,true),
         *            443);
         * 
         *            HttpClient client = new HttpClient();
         *            client.getHostConfiguration().setHost("localhost", 443,
         *            stricthttps); </blockquote>
         * 
         */
        public SslContextedSecureProtocolSocketFactory(SSLContext sslContext,
                boolean verifyHostname) {
            this.sslContext = sslContext;
            this.verifyHostname = verifyHostname;
        }
     
        /**
         * Constructor for SslContextedSecureProtocolSocketFactory. Host name
         * verification will be enabled by default.
         * 
         * @param sslContext
         *            The SSLContext to use for building the SSLSocketFactory. If
         *            this is null, then the default SSLSocketFactory is used.
         */
        public SslContextedSecureProtocolSocketFactory(SSLContext sslContext) {
            this(sslContext, true);
        }
     
        /**
         * Constructor for SslContextedSecureProtocolSocketFactory. The default
         * SSLSocketFactory will be used by default.
         * 
         * @param verifyHostname
         *            The host name verification flag. If set to <code>true</code>
         *            the SSL sessions server host name will be compared to the host
         *            name returned in the server certificates "Common Name" field
         *            of the "SubjectDN" entry. If these names do not match a
         *            Exception is thrown to indicate this. Enabling host name
         *            verification will help to prevent from man-in-the-middle
         *            attacks. If set to <code>false</code> host name verification
         *            is turned off.
         */
        public SslContextedSecureProtocolSocketFactory(boolean verifyHostname) {
            this(null, verifyHostname);
        }
     
        /**
         * Constructor for SslContextedSecureProtocolSocketFactory. By default, the
         * default SSLSocketFactory will be used and host name verification will be
         * enabled.
         */
        public SslContextedSecureProtocolSocketFactory() {
            this(null, true);
        }
     
        /**
         * Set the host name verification flag.
         * 
         * @param verifyHostname
         *            The host name verification flag. If set to <code>true</code>
         *            the SSL sessions server host name will be compared to the host
         *            name returned in the server certificates "Common Name" field
         *            of the "SubjectDN" entry. If these names do not match a
         *            Exception is thrown to indicate this. Enabling host name
         *            verification will help to prevent from man-in-the-middle
         *            attacks. If set to <code>false</code> host name verification
         *            is turned off.
         */
        public synchronized void setHostnameVerification(boolean verifyHostname) {
            this.verifyHostname = verifyHostname;
        }
     
        /**
         * Gets the status of the host name verification flag.
         * 
         * @return Host name verification flag. Either <code>true</code> if host
         *         name verification is turned on, or <code>false</code> if host
         *         name verification is turned off.
         */
        public synchronized boolean getHostnameVerification() {
            return verifyHostname;
        }
     
        /**
         * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int)
         */
        public Socket createSocket(String host, int port, InetAddress clientHost,
                int clientPort) throws IOException, UnknownHostException {
            SSLSocketFactory sf = (SSLSocketFactory) getSslSocketFactory();
            SSLSocket sslSocket = (SSLSocket) sf.createSocket(host, port,
                    clientHost, clientPort);
            verifyHostname(sslSocket);
     
            return sslSocket;
        }
     
        /**
         * Attempts to get a new socket connection to the given host within the
         * given time limit.
         * <p>
         * This method employs several techniques to circumvent the limitations of
         * older JREs that do not support connect timeout. When running in JRE 1.4
         * or above reflection is used to call Socket#connect(SocketAddress
         * endpoint, int timeout) method. When executing in older JREs a controller
         * thread is executed. The controller thread attempts to create a new socket
         * within the given limit of time. If socket constructor does not return
         * until the timeout expires, the controller terminates and throws an
         * {@link ConnectTimeoutException}
         * </p>
         * 
         * @param host
         *            the host name/IP
         * @param port
         *            the port on the host
         * @param clientHost
         *            the local host name/IP to bind the socket to
         * @param clientPort
         *            the port on the local machine
         * @param params
         *            {@link HttpConnectionParams Http connection parameters}
         * 
         * @return Socket a new socket
         * 
         * @throws IOException
         *             if an I/O error occurs while creating the socket
         * @throws UnknownHostException
         *             if the IP address of the host cannot be determined
         */
        public Socket createSocket(final String host, final int port,
                final InetAddress localAddress, final int localPort,
                final HttpConnectionParams params) throws IOException,
                UnknownHostException, ConnectTimeoutException {
            if (params == null) {
                throw new IllegalArgumentException("Parameters may not be null");
            }
            int timeout = params.getConnectionTimeout();
            Socket socket = null;
     
            SocketFactory socketfactory = getSslSocketFactory();
            if (timeout == 0) {
                socket = socketfactory.createSocket(host, port, localAddress,
                        localPort);
            } else {
                socket = socketfactory.createSocket();
                SocketAddress localaddr = new InetSocketAddress(localAddress,
                        localPort);
                SocketAddress remoteaddr = new InetSocketAddress(host, port);
                socket.bind(localaddr);
                socket.connect(remoteaddr, timeout);
            }
            verifyHostname((SSLSocket) socket);
            return socket;
        }
     
        /**
         * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
         */
        public Socket createSocket(String host, int port) throws IOException,
                UnknownHostException {
            SSLSocketFactory sf = (SSLSocketFactory) getSslSocketFactory();
            SSLSocket sslSocket = (SSLSocket) sf.createSocket(host, port);
            verifyHostname(sslSocket);
     
            return sslSocket;
        }
     
        /**
         * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)
         */
        public Socket createSocket(Socket socket, String host, int port,
                boolean autoClose) throws IOException, UnknownHostException {
            SSLSocketFactory sf = (SSLSocketFactory) getSslSocketFactory();
            SSLSocket sslSocket = (SSLSocket) sf.createSocket(socket, host, port,
                    autoClose);
            verifyHostname(sslSocket);
     
            return sslSocket;
        }
     
        /**
         * Describe <code>verifyHostname</code> method here.
         * 
         * @param socket
         *            a <code>SSLSocket</code> value
         * @exception SSLPeerUnverifiedException
         *                If there are problems obtaining the server certificates
         *                from the SSL session, or the server host name does not
         *                match with the "Common Name" in the server certificates
         *                SubjectDN.
         * @exception UnknownHostException
         *                If we are not able to resolve the SSL sessions returned
         *                server host name.
         */
        private void verifyHostname(SSLSocket socket)
                throws SSLPeerUnverifiedException, UnknownHostException {
            synchronized (this) {
                if (!verifyHostname)
                    return;
            }
     
            SSLSession session = socket.getSession();
            String hostname = session.getPeerHost();
            try {
                InetAddress.getByName(hostname);
            } catch (UnknownHostException uhe) {
                throw new UnknownHostException("Could not resolve SSL sessions "
                        + "server hostname: " + hostname);
            }
     
            X509Certificate[] certs = (X509Certificate[]) session
                    .getPeerCertificates();
            if (certs == null || certs.length == 0)
                throw new SSLPeerUnverifiedException(
                        "No server certificates found!");
     
            X500Principal subjectDN = certs[0].getSubjectX500Principal();
     
            // get the common names from the first cert
            List<String> cns = getCNs(subjectDN);
            boolean foundHostName = false;
            for (String cn : cns) {
                if (hostname.equalsIgnoreCase(cn)) {
                    foundHostName = true;
                    break;
                }
            }
            if (!foundHostName) {
                throw new SSLPeerUnverifiedException(
                        "HTTPS hostname invalid: expected '" + hostname
                                + "', received '" + cns + "'");
            }
        }
     
        /**
         * Parses a X.500 distinguished name for the values of the "Common Name"
         * fields. This is done a bit sloppy right now and should probably be done a
         * bit more according to <code>RFC 2253</code>.
         * 
         * @param subjectDN
         *            an X.500 Principal from an X.509 certificate.
         * @return the values of the "Common Name" fields.
         */
        private List<String> getCNs(X500Principal subjectDN) {
            List<String> cns = new ArrayList<String>();
     
            StringTokenizer st = new StringTokenizer(subjectDN.getName(), ",");
            while (st.hasMoreTokens()) {
                String cnField = st.nextToken();
                if (cnField.startsWith("CN=")) {
                    cns.add(cnField.substring(3));
                }
            }
            return cns;
        }
     
        /**
         * Returns the SSLSocketFactory to use to create the sockets. If the
         * sslContext is non-null, this is built from the sslContext; otherwise,
         * this is the default SSLSocketFactory.
         * 
         * @return the SSLSocketFactory to use to create the sockets.
         */
        protected SSLSocketFactory getSslSocketFactory() {
            SSLSocketFactory sslSocketFactory = null;
            synchronized (this) {
                if (this.sslContext != null) {
                    sslSocketFactory = this.sslContext.getSocketFactory();
                }
            }
            if (sslSocketFactory == null) {
                sslSocketFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
            }
            return sslSocketFactory;
        }
     
        /**
         * Sets the SSLContext to use.
         * 
         * @param sslContext
         *            SSLContext to use.
         */
        public synchronized void setSSLContext(SSLContext sslContext) {
            this.sslContext = sslContext;
        }
    }
    A priori la connexion semble fonctionné. Cependant dans les logs appache du serveur je vois ma tentative de connexion se soldé par une erreur 403, et je n'ai aucune erreur du coté Java (aucune exception) et aucune réponse non plus... Ce que je trouve relativement troublant.

    Je me demande donc, si j'utilise la bonne méthode ?

    Cordialement.

  2. #2
    Invité
    Invité(e)
    Par défaut
    Salut,

    Ta méthode me parait bien compliquée, mais résumons : tu veux uniquement faire une connexion à un site via SSL en utilisant une authentification client. SI j'en crois la doc de HTTPClient, il suffit de passer une SSLSocketFactory avec truststore et Keystore et si le site réclame l'authentification il prendra un certificat de ton keystore valable si il le trouve...
    Donc quelque chose du gout de ceci devrait marcher :
    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
     
    public class HttpsTest {
     
        public static void testSLLConection(File cert, String pass){
            try {
     
                InputStream certifinput = new FileInputStream(cert);
                KeyStore ks = KeyStore.getInstance("PKCS12");
                ks.load(certifinput, pass.toCharArray());
     
                KeyStore trustStore  = KeyStore.getInstance(KeyStore.getDefaultType());
                FileInputStream instream = new FileInputStream(new File("my.keystore"));
                try {
                    trustStore.load(instream, "nopassword".toCharArray());
                } finally {
                    try { instream.close(); } catch (Exception ignore) {}
                }
     
                SSLSocketFactory socketFactory = new SSLSocketFactory(ks, pass, trustStore);
                Scheme sch = new Scheme("https", 443, socketFactory);
                httpclient.getConnectionManager().getSchemeRegistry().register(sch);
     
                HttpGet httpget = new HttpGet("https://host/blablabla");
                ...
     
            } catch(Exception e){
                e.printStackTrace();
            }
        }
    }
    (source: http://hc.apache.org/httpcomponents-...CustomSSL.java)

    Non ?

    Ceci dit le détails de ton exception server serait intéressant mais je suppose que c'est uniquement pour dire que ton client n'a pas envoyé de certificat dans sa requête

    EDIT : accepter n'importe quel certificat server est une faille de sécurité plutôt grosse, il vaut mieux mettre le(s) certificat(s) accepté(s) dans un truststore chez le client, ou mieux, le certificat de la CA générant les certificats server si ils ne sont pas auto-signés, comme ça c'est plus stable quand le certificat server devient obsolète

  3. #3
    Membre averti
    Profil pro
    Développeur Web
    Inscrit en
    Août 2008
    Messages
    28
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Août 2008
    Messages : 28
    Par défaut
    Bonjour,

    Merci pour la réponse rapide.

    T'as bien compris la problématique, seulement, j'utilise la version 3.1 de HttpClient, donc ton code ne fonctionne pas. (Mea-culpa, j'aurais du précisé avant...)

    En plus les log apache, sur le serveur, ne m'indique rien de plus...

    Le log d'erreur en mode Debug :
    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
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
     
    [Thu Mar 03 11:17:20 2011] [info] [client 93.17.70.56] Connection to child 28 established (server preprod.aws-legalite.info:443)
    [Thu Mar 03 11:17:25 2011] [info] Seeding PRNG with 656 bytes of entropy
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: before/accept initialization
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 11/11 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0000: 80 65 01 03 01 00 3c                             .e....<          |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1793): | 0011 - <SPACES/NULS>
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 92/92 bytes from BIO#18154c0 [mem: 177499b] (BIO dump follows)
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0000: 00 00 04 01 00 80 00 00-05 00 00 2f 00 00 33 00  .........../..3. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0010: 00 32 00 00 0a 07 00 c0-00 00 16 00 00 13 00 00  .2.............. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0020: 09 06 00 40 00 00 15 00-00 12 00 00 03 02 00 80  ...@............ |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0030: 00 00 08 00 00 14 00 00-11 00 00 ff 4d 6f 6a a0  ............Moj. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0040: 8f e3 71 20 f5 a4 52 e1-72 c9 80 80 35 43 63 e8  ..q ..R.r...5Cc. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0050: c6 3f 08 b2 48 7e 5a fd-7a bb 72 8b              .?..H~Z.z.r.     |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read client hello A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write server hello A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write certificate A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write server done A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 16 03 01 00 86                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 134/134 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 10 00 00 82 00 80 2f 78-ee 45 a6 cc ac 2e f1 f1  ....../x.E...... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 87 88 a6 84 18 29 41 80-dc b6 b7 23 a0 50 4a 9c  .....)A....#.PJ. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: 38 62 35 25 dd d7 2e 9f-d4 90 c5 e2 4d bb 20 b0  8b5%........M. . |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0030: a2 2d 3f 37 00 7a 63 06-a9 30 f2 d2 d2 f5 fa d6  .-?7.zc..0...... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0040: 0e ce 81 bf 12 71 a9 da-f4 99 e6 64 55 6a 3a 78  .....q.....dUj:x |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0050: 6e e3 26 c7 7f d4 b4 22-0b 83 59 52 7c f0 eb 79  n.&...."..YR|..y |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0060: 27 23 5f 56 aa 4d ba 85-7a 98 60 f5 82 17 3a 05  '#_V.M..z.`...:. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0070: e5 ec b8 23 4b e8 14 57-a7 b2 fd fb 20 13 d3 b7  ...#K..W.... ... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0080: ee 5e 16 87 50 25                                .^..P%           |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read client key exchange A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 14 03 01 00 01                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 1/1 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 01                                               .                |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 16 03 01 00 30                                   ....0            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 48/48 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 5e d6 1a 22 50 fb 4e 53-0a d9 31 6d 36 eb 9b 15  ^.."P.NS..1m6... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: c5 a4 fa 88 b8 57 65 d9-b0 c3 d6 d3 33 e4 e4 b3  .....We.....3... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: 16 4c 95 20 3e 0d 9d e7-55 63 c1 45 b9 54 2e af  .L. >...Uc.E.T.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read finished A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write change cipher spec A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write finished A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(679): inside shmcb_store_session
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(685): session_id[0]=238, masked index=14
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1068): entering shmcb_insert_encoded_session, *queue->pos_count = 2
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(992): entering shmcb_expire_division
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1016): will be expiring 2 sessions
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1041): we now have 0 sessions
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1124): we have 13853 bytes and 133 indexes free - enough
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1153): storing in index 8, at offset 4280
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1168): session_id[0]=238, idx->s_id2=177
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1179): leaving now with 148 bytes in the cache and 1 indexes
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1183): leaving shmcb_insert_encoded_session
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(713): leaving shmcb_store successfully
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(427): shmcb_store successful
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1598): Inter-Process Session Cache: request=SET status=OK id=EEB1E3B20A23B9477DABC4D3BF85D6C93EA4BF2A72EF74EFE2A554E0F51AC6D3 timeout=299s (session caching)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1756): OpenSSL: Handshake: done
    [Thu Mar 03 11:17:26 2011] [info] Connection: Client IP: 93.17.70.56, Protocol: TLSv1, Cipher: AES128-SHA (128/128 bits)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 17 03 01 00 90                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 144/144 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 4e b9 b3 24 aa 86 61 c5-c7 5a ef ce 32 fd df 0e  N..$..a..Z..2... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 79 ee 40 cd f4 bb 42 df-3f f0 70 1f f9 3e dc df  y.@...B.?.p..>.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: aa 01 d1 e2 88 cd dc 39-e6 cb 36 f9 9f aa 08 fa  .......9..6..... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0030: 72 d7 2f c3 b7 fd b3 c2-63 42 3e 54 63 5d 4b 15  r./.....cB>Tc]K. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0040: 7a 1b fa a5 d8 94 15 ea-d0 8d 7c 77 a0 fe 66 d0  z.........|w..f. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0050: 5f c8 cb 8f 4a 0e f3 17-11 7e 69 99 20 de 81 a1  _...J....~i. ... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0060: 4d 57 70 7e 8f fd c0 8f-a0 dd 28 bb e6 ef 92 2e  MWp~......(..... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0070: 15 72 3c f0 a6 e9 e0 67-ad de 4f dd 35 66 bd ee  .r<....g..O.5f.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0080: c9 f1 4e 0b df 43 2b 46-b9 59 8e 33 d1 a6 b8 1d  ..N..C+F.Y.3.... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [info] Initial (No.1) HTTPS request received for child 28 (server preprod.aws-legalite.info:443)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(426): Changed client verification type will force renegotiation
    [Thu Mar 03 11:17:26 2011] [info] Requesting connection re-negotiation
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(616): Performing full renegotiation: complete handshake protocol
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSL renegotiate ciphers
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write hello request A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write hello request C
    [Thu Mar 03 11:17:26 2011] [info] Awaiting re-negotiation handshake
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: before accept initialization
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 15 03 01                                         ...              |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1793): | 0005 - <SPACES/NULS>
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 32/32 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: ba e5 35 02 ff 1a 43 5b-00 77 87 4a c5 8f e8 51  ..5...C[.w.J...Q |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 80 b6 f7 32 10 24 c0 3b-de c0 71 71 3a c8 d3 03  ...2.$.;..qq:... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1765): OpenSSL: Read: SSLv3 read client hello B
    PHPNETD083:/home/arnaud# tail -300 /var/log/apache2/preprod.aws-legalite-error_log | grep "\[Thu Mar 03 11:17:"
    [Thu Mar 03 11:17:20 2011] [info] [client 93.17.70.56] Connection to child 28 established (server preprod.aws-legalite.info:443)
    [Thu Mar 03 11:17:25 2011] [info] Seeding PRNG with 656 bytes of entropy
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: before/accept initialization
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 11/11 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0000: 80 65 01 03 01 00 3c                             .e....<          |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1793): | 0011 - <SPACES/NULS>
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 92/92 bytes from BIO#18154c0 [mem: 177499b] (BIO dump follows)
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0000: 00 00 04 01 00 80 00 00-05 00 00 2f 00 00 33 00  .........../..3. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0010: 00 32 00 00 0a 07 00 c0-00 00 16 00 00 13 00 00  .2.............. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0020: 09 06 00 40 00 00 15 00-00 12 00 00 03 02 00 80  ...@............ |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0030: 00 00 08 00 00 14 00 00-11 00 00 ff 4d 6f 6a a0  ............Moj. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0040: 8f e3 71 20 f5 a4 52 e1-72 c9 80 80 35 43 63 e8  ..q ..R.r...5Cc. |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1789): | 0050: c6 3f 08 b2 48 7e 5a fd-7a bb 72 8b              .?..H~Z.z.r.     |
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read client hello A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write server hello A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write certificate A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write server done A
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:25 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 16 03 01 00 86                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 134/134 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 10 00 00 82 00 80 2f 78-ee 45 a6 cc ac 2e f1 f1  ....../x.E...... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 87 88 a6 84 18 29 41 80-dc b6 b7 23 a0 50 4a 9c  .....)A....#.PJ. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: 38 62 35 25 dd d7 2e 9f-d4 90 c5 e2 4d bb 20 b0  8b5%........M. . |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0030: a2 2d 3f 37 00 7a 63 06-a9 30 f2 d2 d2 f5 fa d6  .-?7.zc..0...... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0040: 0e ce 81 bf 12 71 a9 da-f4 99 e6 64 55 6a 3a 78  .....q.....dUj:x |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0050: 6e e3 26 c7 7f d4 b4 22-0b 83 59 52 7c f0 eb 79  n.&...."..YR|..y |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0060: 27 23 5f 56 aa 4d ba 85-7a 98 60 f5 82 17 3a 05  '#_V.M..z.`...:. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0070: e5 ec b8 23 4b e8 14 57-a7 b2 fd fb 20 13 d3 b7  ...#K..W.... ... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0080: ee 5e 16 87 50 25                                .^..P%           |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read client key exchange A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 14 03 01 00 01                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 1/1 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 01                                               .                |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 16 03 01 00 30                                   ....0            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 48/48 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 5e d6 1a 22 50 fb 4e 53-0a d9 31 6d 36 eb 9b 15  ^.."P.NS..1m6... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: c5 a4 fa 88 b8 57 65 d9-b0 c3 d6 d3 33 e4 e4 b3  .....We.....3... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: 16 4c 95 20 3e 0d 9d e7-55 63 c1 45 b9 54 2e af  .L. >...Uc.E.T.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read finished A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write change cipher spec A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write finished A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(679): inside shmcb_store_session
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(685): session_id[0]=238, masked index=14
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1068): entering shmcb_insert_encoded_session, *queue->pos_count = 2
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(992): entering shmcb_expire_division
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1016): will be expiring 2 sessions
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1041): we now have 0 sessions
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1124): we have 13853 bytes and 133 indexes free - enough
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1153): storing in index 8, at offset 4280
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1168): session_id[0]=238, idx->s_id2=177
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1179): leaving now with 148 bytes in the cache and 1 indexes
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(1183): leaving shmcb_insert_encoded_session
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(713): leaving shmcb_store successfully
    [Thu Mar 03 11:17:26 2011] [debug] ssl_scache_shmcb.c(427): shmcb_store successful
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1598): Inter-Process Session Cache: request=SET status=OK id=EEB1E3B20A23B9477DABC4D3BF85D6C93EA4BF2A72EF74EFE2A554E0F51AC6D3 timeout=299s (session caching)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1756): OpenSSL: Handshake: done
    [Thu Mar 03 11:17:26 2011] [info] Connection: Client IP: 93.17.70.56, Protocol: TLSv1, Cipher: AES128-SHA (128/128 bits)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 17 03 01 00 90                                   .....            |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 144/144 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 4e b9 b3 24 aa 86 61 c5-c7 5a ef ce 32 fd df 0e  N..$..a..Z..2... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 79 ee 40 cd f4 bb 42 df-3f f0 70 1f f9 3e dc df  y.@...B.?.p..>.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0020: aa 01 d1 e2 88 cd dc 39-e6 cb 36 f9 9f aa 08 fa  .......9..6..... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0030: 72 d7 2f c3 b7 fd b3 c2-63 42 3e 54 63 5d 4b 15  r./.....cB>Tc]K. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0040: 7a 1b fa a5 d8 94 15 ea-d0 8d 7c 77 a0 fe 66 d0  z.........|w..f. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0050: 5f c8 cb 8f 4a 0e f3 17-11 7e 69 99 20 de 81 a1  _...J....~i. ... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0060: 4d 57 70 7e 8f fd c0 8f-a0 dd 28 bb e6 ef 92 2e  MWp~......(..... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0070: 15 72 3c f0 a6 e9 e0 67-ad de 4f dd 35 66 bd ee  .r<....g..O.5f.. |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0080: c9 f1 4e 0b df 43 2b 46-b9 59 8e 33 d1 a6 b8 1d  ..N..C+F.Y.3.... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [info] Initial (No.1) HTTPS request received for child 28 (server preprod.aws-legalite.info:443)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(426): Changed client verification type will force renegotiation
    [Thu Mar 03 11:17:26 2011] [info] Requesting connection re-negotiation
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(616): Performing full renegotiation: complete handshake protocol
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSL renegotiate ciphers
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write hello request A
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write hello request C
    [Thu Mar 03 11:17:26 2011] [info] Awaiting re-negotiation handshake
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1752): OpenSSL: Handshake: start
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: before accept initialization
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#18154c0 [mem: 1774990] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: 15 03 01                                         ...              |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1793): | 0005 - <SPACES/NULS>
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1817): OpenSSL: read 32/32 bytes from BIO#18154c0 [mem: 1774995] (BIO dump follows)
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1750): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0000: ba e5 35 02 ff 1a 43 5b-00 77 87 4a c5 8f e8 51  ..5...C[.w.J...Q |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1789): | 0010: 80 b6 f7 32 10 24 c0 3b-de c0 71 71 3a c8 d3 03  ...2.$.;..qq:... |
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_io.c(1795): +-------------------------------------------------------------------------+
    [Thu Mar 03 11:17:26 2011] [debug] ssl_engine_kernel.c(1765): OpenSSL: Read: SSLv3 read client hello B
    et le log d'accès
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    93.17.70.56 - - [03/Mar/2011:11:17:26 +0100] "GET /ajax/actes/uploadFichier.php HTTP/1.1" 403 - "-" "null Java/1.6.0_23"
    Je précise aussi que je crée mon KeyStore à partir d'un certificat encodé en p12, stocké sur mon poste.
    Le trustStore quand à lui devrait être le magasin de certificat de la machine sur le quelle est éxecuté l'appli. Mais il est vrai que dans un but de test, j'ai utilisé un truststore qui fais confiance a tout le monde...

    Cordialement

  4. #4
    Invité
    Invité(e)
    Par défaut
    La première question souvent idiote est : pourquoi utiliser une vieille version ? Souvent pour raison de compatibilité avec l'environnement mais es-tu sûr dans ce cas que tu ne peux pas faire autrement ? La version 3.1 est quand même sacrément vieille non ?

    Ensuite dans les log Apache je vois plein de renégociations et je croyais que Apache n'acceptait plus ça (pour cause de grosse faille dans le protocole SSL avec les renegociations)

    Ensuite j'ai rerelu ton code et je ne vois pas où tu envoies au server ton certificat client pour d'authentifier, je loupe quelque chose ?

  5. #5
    Membre averti
    Profil pro
    Développeur Web
    Inscrit en
    Août 2008
    Messages
    28
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Août 2008
    Messages : 28
    Par défaut
    J'utilise la version 3.1 car, j'ai déjà des composants de mon application qui l'utilise, et je ne veut pas tous re-développé.

    Pour les renégociation, je ne sais pas, et je dois bien avoué que je n'en savez rien... Comme t'as peut-être pu le constaté, j'utilise pratiquement la config par défaut de mod_ssl d'apache.

    Sinon, le certificat utilisateur, je le cahrge dans un keystore
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    InputStream certifinput = new FileInputStream(cert);
    KeyStore ks = KeyStore.getInstance("PKCS12");
    ks.load(certifinput, pass.toCharArray());
    que je passe a SSLContext, après avoir initialisé mon truststore
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    KeyStore truststore = KeyStore.getInstance( "Windows-ROOT" );
    truststore .load( null );
    TrustManagerFactory tmf = TrustManagerFactory.getInstance( "SunX509" );
    tmf.init(truststore);
     
    SSLContext sslClientContext = SSLContext.getInstance("SSLv3");
    sslClientContext.init( kmf.getKeyManagers(), tmf.getTrustManagers, null );
    (Commenter dans le premier code source que j'ai montrer)

    SSLContext qui lui est donné à la classe SslContextedSecureProtocolSocketFactory qui vas donné une implémentation pour le protocole Https

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    SslContextedSecureProtocolSocketFactory secureProtocolSocketFactory = new SslContextedSecureProtocolSocketFactory(sslClientContext, false);
     
    Protocol.registerProtocol("https", new Protocol("https", ProtocolSocketFactory)secureProtocolSocketFactory, 443));
    si je ne me trompe pas, et que j'ai bien compris comment ça fonctionne avec HttpClient 3.1.

    Car, j'avoue que c'est très flou pour moi....

  6. #6
    Invité
    Invité(e)
    Par défaut
    L'interface a vraiment changé entre 3.1 et 4.1 ? Tu as essayé d'échanger et de tester si ton code marche toujours ? Tu as regardé dans les changelog si les changements sont retrocompatibles ?

    Sinon trouver de la doc sur httpclient 3.1 est pas facile et je peux pas trop t'aider désolé

Discussions similaires

  1. Connexion Java Client au Serveur HTTPS via proxy
    Par devdev2003 dans le forum Services Web
    Réponses: 17
    Dernier message: 20/05/2011, 09h59
  2. Réponses: 0
    Dernier message: 23/12/2009, 23h21
  3. [Configuration] Connexion avec authentification par htaccess
    Par kendot dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 8
    Dernier message: 16/01/2008, 17h53
  4. Solution VPN avec authentification forte pour PME
    Par JuJu° dans le forum Windows Serveur
    Réponses: 2
    Dernier message: 05/12/2007, 10h29
  5. [C#] LDAP: Connexion et authentification
    Par IdrilElendil dans le forum Windows Forms
    Réponses: 15
    Dernier message: 19/07/2007, 16h26

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