fix registering new account
This commit is contained in:
		
							parent
							
								
									33eeadcf5f
								
							
						
					
					
						commit
						9698251570
					
				
					 1 changed files with 8 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1562,17 +1562,18 @@ class NewAccountConnectedEvent(nec.NetworkIncomingEvent):
 | 
			
		|||
        try:
 | 
			
		||||
            self.errnum = self.conn.connection.Connection.ssl_errnum
 | 
			
		||||
        except AttributeError:
 | 
			
		||||
            self.errnum = -1 # we don't have an errnum
 | 
			
		||||
            self.errnum = [] # we don't have an errnum
 | 
			
		||||
        self.ssl_msg = ''
 | 
			
		||||
        if self.errnum > 0:
 | 
			
		||||
            from common.connection import ssl_error
 | 
			
		||||
            self.ssl_msg = ssl_error.get(self.errnum, _(
 | 
			
		||||
                'Unknown SSL error: %d') % self.errnum)
 | 
			
		||||
        for er in self.errnum:
 | 
			
		||||
            if er > 0:
 | 
			
		||||
                from common.connection import ssl_error
 | 
			
		||||
                self.ssl_msg = ssl_error.get(er, _('Unknown SSL error: %d') % \
 | 
			
		||||
                    er)
 | 
			
		||||
        self.ssl_cert = ''
 | 
			
		||||
        if hasattr(self.conn.connection.Connection, 'ssl_cert_pem'):
 | 
			
		||||
        if len(self.conn.connection.Connection.ssl_cert_pem):
 | 
			
		||||
            self.ssl_cert = self.conn.connection.Connection.ssl_cert_pem
 | 
			
		||||
        self.ssl_fingerprint = ''
 | 
			
		||||
        if hasattr(self.conn.connection.Connection, 'ssl_fingerprint_sha1'):
 | 
			
		||||
        if len(self.conn.connection.Connection.ssl_fingerprint_sha1):
 | 
			
		||||
            self.ssl_fingerprint = \
 | 
			
		||||
                self.conn.connection.Connection.ssl_fingerprint_sha1
 | 
			
		||||
        return True
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue