(self, alpn_protocols)
| 502 | self.sni_callback = shim_cb |
| 503 | |
| 504 | def set_alpn_protocols(self, alpn_protocols): |
| 505 | protos = bytearray() |
| 506 | for protocol in alpn_protocols: |
| 507 | b = bytes(protocol, 'ascii') |
| 508 | if len(b) == 0 or len(b) > 255: |
| 509 | raise SSLError('ALPN protocols must be 1 to 255 in length') |
| 510 | protos.append(len(b)) |
| 511 | protos.extend(b) |
| 512 | |
| 513 | self._set_alpn_protocols(protos) |
| 514 | |
| 515 | def _load_windows_store_certs(self, storename, purpose): |
| 516 | try: |