Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-tls
Commits
d9950d01
Commit
d9950d01
authored
Mar 14, 2019
by
Marten Seemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use the new Protocol Labs PEN for the certificate extension
parent
2b29f223
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
extension.go
extension.go
+1
-2
extension_test.go
extension_test.go
+1
-1
No files found.
extension.go
View file @
d9950d01
package
libp2ptls
// TODO: get an assigment for a valid OID
var
extensionPrefix
=
[]
int
{
1
,
3
,
6
,
1
,
4
,
1
,
123456789
}
var
extensionPrefix
=
[]
int
{
1
,
3
,
6
,
1
,
4
,
1
,
53594
}
// getPrefixedExtensionID returns an Object Identifier
// that can be used in x509 Certificates.
...
...
extension_test.go
View file @
d9950d01
...
...
@@ -7,7 +7,7 @@ import (
var
_
=
Describe
(
"Extensions"
,
func
()
{
It
(
"generates a prefixed extension ID"
,
func
()
{
Expect
(
getPrefixedExtensionID
([]
int
{
13
,
37
}))
.
To
(
Equal
([]
int
{
1
,
3
,
6
,
1
,
4
,
1
,
123456789
,
13
,
37
}))
Expect
(
getPrefixedExtensionID
([]
int
{
13
,
37
}))
.
To
(
Equal
([]
int
{
1
,
3
,
6
,
1
,
4
,
1
,
53594
,
13
,
37
}))
})
It
(
"compares extension IDs"
,
func
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment