close Warning: Failed to sync with repository "(default)": [Errno 12] Cannot allocate memory; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.

Ticket #369: fix-for-patch.diff

File fix-for-patch.diff, 819 bytes (added by AopicieR, at 2011-09-08T10:30:37Z)

The first patch contained an error. This should fix it. This fix needs to be applied on top of the first patch.

  • lib/ssl_gnutls.c

    === modified file 'lib/ssl_gnutls.c'
     
    239239                }
    240240                else
    241241                {
    242 
    243                         conn->func( conn->data, verify_certificate_callback( conn->session ), NULL, cond );
     242                        if( conn->verify && st == GNUTLS_E_CERTIFICATE_ERROR )
     243                                /* This means that gnutls_handshake failed because of the
     244                                 * certificate verification, so let's pass some more detailed
     245                                 * information about what went wrong to conn->func by calling
     246                                 * verify_certificate_callback again.
     247                                 */
     248                                conn->func( conn->data, verify_certificate_callback(
     249                                                        conn->session ), NULL, cond );
     250                        else
     251                                conn->func( conn->data, 0, NULL, cond );
    244252
    245253                        gnutls_deinit( conn->session );
    246254                        gnutls_certificate_free_credentials( conn->xcred );