Changeset 9146

Show
Ignore:
Timestamp:
12/15/07 09:31:42 (11 months ago)
Author:
asterix
Message:

[shprotx] fix loading of multiple SSL certificates and better error message. fixes #3619

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/xmpp/transports_nb.py

    r9095 r9146  
    762762                                if 'BEGIN CERTIFICATE' in line: 
    763763                                        begin = i 
    764                                         continue 
    765764                                elif 'END CERTIFICATE' in line and begin > -1: 
    766765                                        cert = ''.join(lines[begin:i+2]) 
     
    769768                                                        OpenSSL.crypto.FILETYPE_PEM, cert) 
    770769                                                store.add_cert(X509cert) 
     770                                        except OpenSSL.crypto.Error, exception_obj: 
     771                                                log.warning('Unable to load a certificate from file %s: %s' %\ 
     772                                                        (gajim.MY_CACERTS, exception_obj.message[0][2])) 
    771773                                        except: 
    772                                                 log.warning('Unable to load a certificate from file %s' % \ 
     774                                                log.warning( 
     775                                                        'Unknown error while loading certificate from file %s' % \ 
    773776                                                        gajim.MY_CACERTS) 
    774777                                        begin = -1