Skip to content

Commit

Permalink
Merge pull request #108 from Covertness/dep_url_25
Browse files Browse the repository at this point in the history
update url version
  • Loading branch information
Covertness authored Jan 19, 2025
2 parents a6f1679 + fb4739b commit 9d658c2
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = ["CoAP"]
edition = "2021"

[dependencies]
url = "^2.2"
url = "^2.5"
log = "^0.4"
regex = "^1.5"
tokio = {version = "^1.32", features = ["full"]}
Expand Down
15 changes: 15 additions & 0 deletions tests/test_certs/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# Tests Certificates and Keys
keys and certificates generated using openssl and adapted from (webrtc-rs)[https://github.com/webrtc-rs/webrtc/tree/master/dtls/examples/certificates]

## generate commands
```shell
# Server.
$ SERVER_NAME='coap_server'
$ openssl ecparam -name prime256v1 -genkey -noout -out "${SERVER_NAME}.pem"
$ openssl req -key "${SERVER_NAME}.pem" -new -sha256 -subj '/C=NL' -out "${SERVER_NAME}.csr"
$ openssl x509 -req -in "${SERVER_NAME}.csr" -extfile "${EXTFILE}" -days 365 -signkey "${SERVER_NAME}.pem" -sha256 -out "${SERVER_NAME}.pub.pem"

# Client.
$ CLIENT_NAME='coap_client'
$ openssl ecparam -name prime256v1 -genkey -noout -out "${CLIENT_NAME}.pem"
$ openssl req -key "${CLIENT_NAME}.pem" -new -sha256 -subj '/C=NL' -out "${CLIENT_NAME}.csr"
$ openssl x509 -req -in "${CLIENT_NAME}.csr" -extfile "${EXTFILE}" -days 365 -CA "${SERVER_NAME}.pub.pem" -CAkey "${SERVER_NAME}.pem" -set_serial '0xabcd' -sha256 -out "${CLIENT_NAME}.pub.pem"
```
8 changes: 4 additions & 4 deletions tests/test_certs/coap_client.csr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----BEGIN CERTIFICATE REQUEST-----
MIHHMG8CAQAwDTELMAkGA1UEBhMCTkwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC
AASGAlUii5DkmnGhhUZXFAbagu/NHKwRxgu2RDdNCXveTIGqHdC3RdwMRgoUUk9t
MrTfK/NoHm4G4G1wjhGVMeVWoAAwCgYIKoZIzj0EAwIDSAAwRQIhAP7gK7OUe64O
z07krukXYMQYCk8e5+ptiVxpvYJK4CYBAiBV7dghREnjXQfqHaTLMhGd+NNK/iIM
YDqyIk56dApSZA==
AASrVgK4GG07FtKloEAh3EUzrIrMGYMagaZT5ERd5mt+VsEDg4nLQFXhDA/0WZf3
tzEKXLi3OlbWR3hli4fYw+uDoAAwCgYIKoZIzj0EAwIDSAAwRQIhAO2lxvfqPLEn
DxsSundZgFL3ZTl+5UQJrW+4Uh8ZTyGpAiBd2dzerMa/T9P+xjMJpHPbnJKDnXQu
MNPmD3CzlG+3ig==
-----END CERTIFICATE REQUEST-----
6 changes: 3 additions & 3 deletions tests/test_certs/coap_client.pem
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIITp0mIkMrvGClVEzxfYC7EYWEjihPeZfZYubOMAC3O6oAoGCCqGSM49
AwEHoUQDQgAEhgJVIouQ5JpxoYVGVxQG2oLvzRysEcYLtkQ3TQl73kyBqh3Qt0Xc
DEYKFFJPbTK03yvzaB5uBuBtcI4RlTHlVg==
MHcCAQEEINV0o4CxrFILfGIFKvjRvtrjBgypC8kcFwFm57/g+tx2oAoGCCqGSM49
AwEHoUQDQgAEq1YCuBhtOxbSpaBAIdxFM6yKzBmDGoGmU+REXeZrflbBA4OJy0BV
4QwP9FmX97cxCly4tzpW1kd4ZYuH2MPrgw==
-----END EC PRIVATE KEY-----
14 changes: 7 additions & 7 deletions tests/test_certs/coap_client.pub.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-----BEGIN CERTIFICATE-----
MIIBYTCCAQegAwIBAgIDAKvNMAoGCCqGSM49BAMCMA0xCzAJBgNVBAYTAk5MMB4X
DTI0MDEwMzAwMjU0NVoXDTI2MDEwMjAwMjU0NVowDTELMAkGA1UEBhMCTkwwWTAT
BgcqhkjOPQIBBggqhkjOPQMBBwNCAASGAlUii5DkmnGhhUZXFAbagu/NHKwRxgu2
RDdNCXveTIGqHdC3RdwMRgoUUk9tMrTfK/NoHm4G4G1wjhGVMeVWo1YwVDASBgNV
HREECzAJggdjb2FwLnJzMB0GA1UdDgQWBBTUQW4lxsK5oobySmuh09ErNzuS0jAf
BgNVHSMEGDAWgBR111V1OWcCGw1LzOPCSldCTViCATAKBggqhkjOPQQDAgNIADBF
AiEA9fmS39TTwMzFl5vOodbaZkW/AALOuXMl0dwsEM1XCjcCIH0FpCf/oRGVkue8
muY0CJKbZL96xiq0cokH1LiLyEdK
DTI1MDExNzAyNTk0OFoXDTI2MDExNzAyNTk0OFowDTELMAkGA1UEBhMCTkwwWTAT
BgcqhkjOPQIBBggqhkjOPQMBBwNCAASrVgK4GG07FtKloEAh3EUzrIrMGYMagaZT
5ERd5mt+VsEDg4nLQFXhDA/0WZf3tzEKXLi3OlbWR3hli4fYw+uDo1YwVDASBgNV
HREECzAJggdjb2FwLnJzMB0GA1UdDgQWBBT/iSCz0TIfoC+9BgDJsmXpJvibGTAf
BgNVHSMEGDAWgBQC1dL17C0yO3OcXld2QjyWCovr9DAKBggqhkjOPQQDAgNIADBF
AiEAlPIGzv/sfWzWlTEtxbL51SjlPHjBZyHqL1dVH13kRTkCIBOWBTWRx7O46+IJ
Yjcq897bUzaGSxDiGwwJeeORYVP+
-----END CERTIFICATE-----
10 changes: 5 additions & 5 deletions tests/test_certs/coap_server.csr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-----BEGIN CERTIFICATE REQUEST-----
MIHIMG8CAQAwDTELMAkGA1UEBhMCTkwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC
AATz4a33hLlTBl0Z5GriykNPe4p08uV748n1kZxGiGu5DUO40HLbGBU4glXheMhU
/D/bqBvUqtgh3e11B5NrArWioAAwCgYIKoZIzj0EAwIDSQAwRgIhAN3ULw0uWvw3
ES4zuU2Nbten6F3HnjvI4r94mWdENwUJAiEA1aQoDg1fxe808Jqqzo3XXE7qpwHE
RkXKji301dsv/S8=
MIHHMG8CAQAwDTELMAkGA1UEBhMCTkwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC
AASZwuhnFexl4+/wA2dfc7OCEAUz407FlTDYOldeTWhv/TdKXSPh8NxipL1w+14z
/eQXBqZQovHJB9j93SN8zoGkoAAwCgYIKoZIzj0EAwIDSAAwRQIhANYwr2mkwz5E
UOcuw9oS0K6Py7I03WHDcskuFNNQt5B8AiB55mNz/Q8Qjvr0Cdjh83dmvrmzBz5d
BbgrxQg9e4HTRQ==
-----END CERTIFICATE REQUEST-----
6 changes: 3 additions & 3 deletions tests/test_certs/coap_server.pem
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEICfZkO1MZQ+9u7en3PnZnDRIKP9TNbOJYuMGQV7knEaWoAoGCCqGSM49
AwEHoUQDQgAE8+Gt94S5UwZdGeRq4spDT3uKdPLle+PJ9ZGcRohruQ1DuNBy2xgV
OIJV4XjIVPw/26gb1KrYId3tdQeTawK1og==
MHcCAQEEIG35yqAr17wAautvX2D8s6F0sCUcqcFCkEIjsyKtqqOWoAoGCCqGSM49
AwEHoUQDQgAEmcLoZxXsZePv8ANnX3OzghAFM+NOxZUw2DpXXk1ob/03Sl0j4fDc
YqS9cPteM/3kFwamUKLxyQfY/d0jfM6BpA==
-----END EC PRIVATE KEY-----
16 changes: 8 additions & 8 deletions tests/test_certs/coap_server.pub.pem
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-----BEGIN CERTIFICATE-----
MIIBUDCB96ADAgECAhRHnYPbxtNBofKynpvbnDQu7vc5fTAKBggqhkjOPQQDAjAN
MQswCQYDVQQGEwJOTDAeFw0yNDAxMDMwMDIzNTNaFw0yNTAxMDIwMDIzNTNaMA0x
CzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8+Gt94S5UwZd
GeRq4spDT3uKdPLle+PJ9ZGcRohruQ1DuNBy2xgVOIJV4XjIVPw/26gb1KrYId3t
dQeTawK1oqM1MDMwEgYDVR0RBAswCYIHY29hcC5yczAdBgNVHQ4EFgQUdddVdTln
AhsNS8zjwkpXQk1YggEwCgYIKoZIzj0EAwIDSAAwRQIga8djTXXxFgXDvg9DJOlu
JiyVXNtEm8+imToYFqXIj1ECIQC2P4ujsYgU9RYgv4elTf+AZwD/lFfuFXriMhLs
F7KAyA==
MIIBUDCB96ADAgECAhRdXRTz/UqPpqshsS+b/fMLKouIXDAKBggqhkjOPQQDAjAN
MQswCQYDVQQGEwJOTDAeFw0yNTAxMTcwMjU5MTVaFw0yNjAxMTcwMjU5MTVaMA0x
CzAJBgNVBAYTAk5MMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmcLoZxXsZePv
8ANnX3OzghAFM+NOxZUw2DpXXk1ob/03Sl0j4fDcYqS9cPteM/3kFwamUKLxyQfY
/d0jfM6BpKM1MDMwEgYDVR0RBAswCYIHY29hcC5yczAdBgNVHQ4EFgQUAtXS9ewt
MjtznF5XdkI8lgqL6/QwCgYIKoZIzj0EAwIDSAAwRQIgfgpX5CpzdJZo0uU7DQnq
ATfOSCjAlwRYCClPfnfesckCIQDIZ2Tzq6UxczggOLh/iVGLt/rufJwu76Mp+KiF
WZgbyg==
-----END CERTIFICATE-----

0 comments on commit 9d658c2

Please sign in to comment.