kopia lustrzana https://github.com/micropython/micropython-lib
Porównaj commity
3 Commity
51e29ac30c
...
94d5260519
Autor | SHA1 | Data |
---|---|---|
Trent Piepho | 94d5260519 | |
Damien George | 45ead11f96 | |
Trent Piepho | 1a6902b2f2 |
|
@ -129,14 +129,13 @@ async def advertise(
|
|||
# Services are prioritised to go in the advertising data because iOS supports
|
||||
# filtering scan results by service only, so services must come first.
|
||||
if services:
|
||||
for uuid in services:
|
||||
b = bytes(uuid)
|
||||
if len(b) == 2:
|
||||
resp_data = _append(adv_data, resp_data, _ADV_TYPE_UUID16_COMPLETE, b)
|
||||
elif len(b) == 4:
|
||||
resp_data = _append(adv_data, resp_data, _ADV_TYPE_UUID32_COMPLETE, b)
|
||||
elif len(b) == 16:
|
||||
resp_data = _append(adv_data, resp_data, _ADV_TYPE_UUID128_COMPLETE, b)
|
||||
for uuid_len, code in (
|
||||
(2, _ADV_TYPE_UUID16_COMPLETE),
|
||||
(4, _ADV_TYPE_UUID32_COMPLETE),
|
||||
(16, _ADV_TYPE_UUID128_COMPLETE),
|
||||
):
|
||||
if uuids := [bytes(uuid) for uuid in services if len(bytes(uuid)) == uuid_len]:
|
||||
resp_data = _append(adv_data, resp_data, code, b"".join(uuids))
|
||||
|
||||
if name:
|
||||
resp_data = _append(adv_data, resp_data, _ADV_TYPE_NAME, name)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
metadata(version="0.2.0")
|
||||
metadata(version="0.2.1")
|
||||
|
||||
module("ssl.py", opt=3)
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import tls
|
||||
from tls import (
|
||||
CERT_NONE,
|
||||
CERT_OPTIONAL,
|
||||
CERT_REQUIRED,
|
||||
MBEDTLS_VERSION,
|
||||
PROTOCOL_TLS_CLIENT,
|
||||
PROTOCOL_TLS_SERVER,
|
||||
)
|
||||
from tls import *
|
||||
|
||||
|
||||
class SSLContext:
|
||||
|
|
Ładowanie…
Reference in New Issue