Commit Graph

23 Commits

Author SHA1 Message Date
v1rtl
6fd1344457 Enable certificate.go for WASM builds
Go WASM interop supports x509, PEM and other cryptography functions
(but not all), so there is no reason not to include those in
the wasm build.

This will also fix compilation errors for when something is
using webrtc and targets both wasm and server

The PR was tested locally (via a simple web folder with wasm_exec.js
and index.html) and I confirmed being able to generate a X509
certificate
2025-05-04 23:54:47 -04:00
Evan Brass
34f547626b Update CertificateFromPEM to support OpenSSL
Update CertificateFromPEM to be a loop over the PEM blocks.
This allows decoding the private key before decoding the certificate.
Tries to parse the certificate block directly but if that errors,
then it also tries to base64 decode the certificate block.

Fixes #3042
2025-03-10 23:23:54 -04:00
Joe Turki
feeeebf251 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 07:16:06 -06:00
Sean DuBois
f388de6581 Update module github.com/pion/dtls/v2 to v3
Generated by renovateBot
2024-07-25 11:16:12 -05:00
Sean DuBois
dc4b591c4d Start pion/webrtc/v4
60eea43 is a breaking change
2023-09-05 11:48:14 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Pion
308f8616a3 Update CI configs to v0.10.6
Update lint scripts and CI configs.
2023-04-08 14:24:19 -04:00
Sean DuBois
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
Sean DuBois
f1831eb5ee Update GenerateCertificate to match libwebrtc
When attempting to interact with a WebRTC service a user was getting a
DTLS alert of UnknownCA. The remote service was asserting the lifetime +
subject of the certificate. This PR modifies Pion's certificate
generation code to match libwebrtc so it can work with the WebRTC
service.

Resolves #1940
2021-09-03 11:00:55 -04:00
Sean DuBois
e2fd97b053 Make default certificate lifetime 30 days
This matches the W3C spec for generateCertificate. In the future we will
add an argument that lets the user pass a max of 1 year.

Relates to c6c241
2021-04-10 11:56:20 -07:00
Benny Daon
c6c241d57c Add CertificateFromPEM and PEM() to Certificate
Allow for easier usage of a pre-existing certificate
2021-04-10 19:05:18 +03:00
Sean DuBois
804a12fed3 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-30 09:06:34 -07:00
obasajujoshua31
9d393905c1 Add GetMediaStats to StatsReport
Add an API to get basic stats around certificate

Relates to #610
2020-09-22 12:03:52 -04:00
Sean DuBois
89d7de1787 Start /v3
See #9 for the features we have planned, and the breaking changes that
may occur.
2020-06-25 09:45:27 -07:00
Atsushi Watanabe
e7e1cf5a74 Upgrade pion/dtls to v2.0.0-rc.6
Follow dtls module API and module path update.
2020-02-17 09:01:33 +09:00
Sean DuBois
d10941f2a4 Add SettingEngine entries needed for offline sync
Allow users to set statice ICECredentials and to disable
DTLS Certificate Verification
2019-12-09 16:43:44 -08:00
Sean DuBois
9eb515af7c Use pion/dtls v2
API now allows multiple certificates, there is no behavior change
this is just to bring things more inline with crypto/tls
2019-11-24 23:29:20 -08:00
Sean DuBois
dbde6114a2 Update import paths
Add /v2 to import paths everywhere
2019-04-07 02:17:15 -07:00
Sean DuBois
4c781e64d9 Return error on certificate fingerprint failure
Instead of printing the error to stdout return the error to the user.
This may not be a hard error (as later certificates would have passed)
but it never is good to be in a state where you have certificates in a
broken state.

Resolves #586
2019-04-05 00:48:22 -07:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
Alex Browne
012a7ea686 Improve build tags for Wasm
Fixes #515

This includes a few small and closely related changes:

1. All occurrences of the build tag `+build js` have been changed to the
   more precise `+build js,wasm`. This will exclude the files from being
   included by third-party compilers like GopherJS, with which they are
   incompatible.
2. Some files which are incompatible with JavaScript/Wasm now have the
   correct build tag (`+build -js`) so they will be excluded from Wasm
   builds.
3. Some configuration options which are incompatible with
   JavaScript/Wasm (or at least the current bindings) will now no longer
   appear in Wasm builds. This meant creating new files with new struct
   definitions and the appropriate build tags.
2019-03-22 10:48:03 -07:00
backkem
bcdbc35ce6 Reduce global state
Relates to #434
2019-03-21 12:48:57 +01:00
Max Hawkins
0647ce9c26 Remove rtc prefix from filenames
Relates to #408
2019-02-17 16:22:56 -08:00