+40
-21
lines changedFilter options
+40
-21
lines changed Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
name: golang.org/x/sys/internal/unsafeheader
3
-
version: v0.0.0-20200909081042-eff7692f9009
3
+
version: v0.0.0-20220422013727-9388b58f7150
4
4
type: go
5
5
summary: Package unsafeheader contains header declarations for the Go runtime's slice
6
6
and string implementations.
7
7
homepage: https://pkg.go.dev/golang.org/x/sys/internal/unsafeheader
8
8
license: bsd-3-clause
9
9
licenses:
10
-
- sources: sys@v0.0.0-20200909081042-eff7692f9009/LICENSE
10
+
- sources: sys@v0.0.0-20220422013727-9388b58f7150/LICENSE
11
11
text: |
12
12
Copyright (c) 2009 The Go Authors. All rights reserved.
13
13
@@ -36,7 +36,7 @@ licenses:
36
36
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37
37
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38
38
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
-
- sources: sys@v0.0.0-20200909081042-eff7692f9009/PATENTS
39
+
- sources: sys@v0.0.0-20220422013727-9388b58f7150/PATENTS
40
40
text: |
41
41
Additional IP Rights Grant (Patents)
42
42
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
name: golang.org/x/sys/unix
3
-
version: v0.0.0-20200909081042-eff7692f9009
3
+
version: v0.0.0-20220422013727-9388b58f7150
4
4
type: go
5
5
summary: Package unix contains an interface to the low-level operating system primitives.
6
6
homepage: https://pkg.go.dev/golang.org/x/sys/unix
7
7
license: bsd-3-clause
8
8
licenses:
9
-
- sources: sys@v0.0.0-20200909081042-eff7692f9009/LICENSE
9
+
- sources: sys@v0.0.0-20220422013727-9388b58f7150/LICENSE
10
10
text: |
11
11
Copyright (c) 2009 The Go Authors. All rights reserved.
12
12
@@ -35,7 +35,7 @@ licenses:
35
35
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36
36
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
37
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
-
- sources: sys@v0.0.0-20200909081042-eff7692f9009/PATENTS
38
+
- sources: sys@v0.0.0-20220422013727-9388b58f7150/PATENTS
39
39
text: |
40
40
Additional IP Rights Grant (Patents)
41
41
Original file line number Diff line number Diff line change
@@ -74,7 +74,8 @@ The tool offers also the ability to flash SSL certificates to a module:
74
74
./arduino-fwuploader certificates flash -b arduino:samd:nano_33_iot" -a COM10 -u arduino.cc:443 -u google.com:443
75
75
```
76
76
77
-
or you can specify a path to a file in `.der` format with `-f` instead of the URL of the certificate
77
+
or you can specify a path to a file in `.der` format or in `.pem` format with `-f` or `--file` instead of the URL of the
78
+
certificate
78
79
79
80
Due to a limitation on the handling of certs in the NINA modules, when `certificates flash` command is launched, all the
80
81
previous certificates are going to be erased. To overcome this it's required to upload them all together:
Original file line number Diff line number Diff line change
@@ -397,6 +397,8 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
397
397
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
398
398
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM=
399
399
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
400
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
401
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
400
402
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
401
403
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
402
404
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
Original file line number Diff line number Diff line change
@@ -147,14 +147,21 @@ func (f *NinaFlasher) certificateFromFile(certificateFile *paths.Path) ([]byte,
147
147
logrus.Error(err)
148
148
return nil, err
149
149
}
150
-
151
-
cert, err := x509.ParseCertificate(data)
152
-
if err != nil {
153
-
logrus.Error(err)
154
-
return nil, err
150
+
switch certificateFile.Ext() {
151
+
case ".cer":
152
+
// the data needs to be formatted in PEM format
153
+
cert, err := x509.ParseCertificate(data)
154
+
if err != nil {
155
+
logrus.Error(err)
156
+
return nil, err
157
+
}
158
+
return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: cert.Raw}), nil
159
+
case ".pem":
160
+
// the data is already encoded in pem format and we do not need to parse it.
161
+
return data, nil
162
+
default:
163
+
return nil, fmt.Errorf("cert format %s not supported, please use .pem or .cer", certificateFile.Ext())
155
164
}
156
-
157
-
return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: cert.Raw}), nil
158
165
}
159
166
160
167
func (f *NinaFlasher) certificateFromURL(URL string) ([]byte, error) {
Original file line number Diff line number Diff line change
@@ -119,14 +119,20 @@ func (f *WincFlasher) certificateFromFile(certificateFile *paths.Path) ([]byte,
119
119
logrus.Error(err)
120
120
return nil, err
121
121
}
122
-
123
-
cert, err := x509.ParseCertificate(data)
124
-
if err != nil {
125
-
logrus.Error(err)
126
-
return nil, err
122
+
switch certificateFile.Ext() {
123
+
case ".cer":
124
+
cert, err := x509.ParseCertificate(data)
125
+
if err != nil {
126
+
logrus.Error(err)
127
+
return nil, err
128
+
}
129
+
return f.getCertificateData(cert)
130
+
case ".pem":
131
+
// the data is already encoded in pem format and we do not need to parse it.
132
+
return data, nil
133
+
default:
134
+
return nil, fmt.Errorf("cert format %s not supported, please use .pem or .cer", certificateFile.Ext())
127
135
}
128
-
129
-
return f.getCertificateData(cert)
130
136
}
131
137
132
138
func (f *WincFlasher) certificateFromURL(URL string) ([]byte, error) {
Original file line number Diff line number Diff line change
@@ -15,4 +15,5 @@ require (
15
15
go.bug.st/downloader/v2 v2.1.1
16
16
go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18
17
17
go.bug.st/serial v1.3.0
18
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
18
19
)
Original file line number Diff line number Diff line change
@@ -403,6 +403,8 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
403
403
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
404
404
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM=
405
405
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
406
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
407
+
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
406
408
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
407
409
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
408
410
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4