()
| 81 | private List<Integer> enabledSecTypes = new ArrayList<Integer>(); |
| 82 | |
| 83 | public final List<Integer> GetEnabledSecTypes() |
| 84 | { |
| 85 | List<Integer> result = new ArrayList<Integer>(); |
| 86 | |
| 87 | /* Partial workaround for Vino's stupid behaviour. It doesn't allow |
| 88 | * the basic authentication types as part of the VeNCrypt handshake, |
| 89 | * making it impossible for a client to do opportunistic encryption. |
| 90 | * At least make it possible to connect when encryption is explicitly |
| 91 | * disabled. */ |
| 92 | for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext(); ) { |
| 93 | int refType = (Integer)i.next(); |
| 94 | if (refType >= 0x100) { |
| 95 | result.add(secTypeVeNCrypt); |
| 96 | break; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | for (Iterator<Integer> i = enabledSecTypes.iterator(); i.hasNext(); ) { |
| 101 | int refType = (Integer)i.next(); |
| 102 | if (refType < 0x100) |
| 103 | result.add(refType); |
| 104 | } |
| 105 | |
| 106 | return (result); |
| 107 | } |
| 108 | |
| 109 | public final List<Integer> GetEnabledExtSecTypes() |
| 110 | { |
no test coverage detected