/usr/lib/python3/dist-packages/Glacier2/SSLInfo_ice.py is in python3-zeroc-ice 3.7.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | # -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
#
# Ice version 3.7.0
#
# <auto-generated>
#
# Generated from file `SSLInfo.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#
from sys import version_info as _version_info_
import Ice, IcePy
import Ice.BuiltinSequences_ice
# Included module Ice
_M_Ice = Ice.openModule('Ice')
# Start of module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')
__name__ = 'Glacier2'
if 'SSLInfo' not in _M_Glacier2.__dict__:
_M_Glacier2.SSLInfo = Ice.createTempClass()
class SSLInfo(object):
"""
Information taken from an SSL connection used for permissions
verification.
Members:
remoteHost -- The remote host.
remotePort -- The remote port.
localHost -- The router's host.
localPort -- The router's port.
cipher -- The negotiated cipher suite.
certs -- The certificate chain.
"""
def __init__(self, remoteHost='', remotePort=0, localHost='', localPort=0, cipher='', certs=None):
self.remoteHost = remoteHost
self.remotePort = remotePort
self.localHost = localHost
self.localPort = localPort
self.cipher = cipher
self.certs = certs
def __hash__(self):
_h = 0
_h = 5 * _h + Ice.getHash(self.remoteHost)
_h = 5 * _h + Ice.getHash(self.remotePort)
_h = 5 * _h + Ice.getHash(self.localHost)
_h = 5 * _h + Ice.getHash(self.localPort)
_h = 5 * _h + Ice.getHash(self.cipher)
if self.certs:
for _i0 in self.certs:
_h = 5 * _h + Ice.getHash(_i0)
return _h % 0x7fffffff
def __compare(self, other):
if other is None:
return 1
elif not isinstance(other, _M_Glacier2.SSLInfo):
return NotImplemented
else:
if self.remoteHost is None or other.remoteHost is None:
if self.remoteHost != other.remoteHost:
return (-1 if self.remoteHost is None else 1)
else:
if self.remoteHost < other.remoteHost:
return -1
elif self.remoteHost > other.remoteHost:
return 1
if self.remotePort is None or other.remotePort is None:
if self.remotePort != other.remotePort:
return (-1 if self.remotePort is None else 1)
else:
if self.remotePort < other.remotePort:
return -1
elif self.remotePort > other.remotePort:
return 1
if self.localHost is None or other.localHost is None:
if self.localHost != other.localHost:
return (-1 if self.localHost is None else 1)
else:
if self.localHost < other.localHost:
return -1
elif self.localHost > other.localHost:
return 1
if self.localPort is None or other.localPort is None:
if self.localPort != other.localPort:
return (-1 if self.localPort is None else 1)
else:
if self.localPort < other.localPort:
return -1
elif self.localPort > other.localPort:
return 1
if self.cipher is None or other.cipher is None:
if self.cipher != other.cipher:
return (-1 if self.cipher is None else 1)
else:
if self.cipher < other.cipher:
return -1
elif self.cipher > other.cipher:
return 1
if self.certs is None or other.certs is None:
if self.certs != other.certs:
return (-1 if self.certs is None else 1)
else:
if self.certs < other.certs:
return -1
elif self.certs > other.certs:
return 1
return 0
def __lt__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r < 0
def __le__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r <= 0
def __gt__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r > 0
def __ge__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r >= 0
def __eq__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r == 0
def __ne__(self, other):
r = self.__compare(other)
if r is NotImplemented:
return r
else:
return r != 0
def __str__(self):
return IcePy.stringify(self, _M_Glacier2._t_SSLInfo)
__repr__ = __str__
_M_Glacier2._t_SSLInfo = IcePy.defineStruct('::Glacier2::SSLInfo', SSLInfo, (), (
('remoteHost', (), IcePy._t_string),
('remotePort', (), IcePy._t_int),
('localHost', (), IcePy._t_string),
('localPort', (), IcePy._t_int),
('cipher', (), IcePy._t_string),
('certs', (), _M_Ice._t_StringSeq)
))
_M_Glacier2.SSLInfo = SSLInfo
del SSLInfo
# End of module Glacier2
Ice.sliceChecksums["::Glacier2::SSLInfo"] = "ca63bc6d361a48471c4d16ea29818e5"
|