Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
1a072f4b
Commit
1a072f4b
authored
Dec 15, 2010
by
Adam Langley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/tls: commit fixes which I hadn't saved.
R=rsc CC=golang-dev
https://golang.org/cl/3685041
parent
976e4572
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
src/pkg/crypto/tls/cipher_suites.go
src/pkg/crypto/tls/cipher_suites.go
+6
-4
src/pkg/crypto/tls/common.go
src/pkg/crypto/tls/common.go
+1
-1
No files found.
src/pkg/crypto/tls/cipher_suites.go
View file @
1a072f4b
...
...
@@ -16,9 +16,11 @@ import (
// function. All cipher suites currently assume RSA key agreement.
type
cipherSuite
struct
{
// the lengths, in bytes, of the key material needed for each component.
keyLen
,
macLen
,
ivLen
int
cipher
func
(
key
,
iv
[]
byte
,
isRead
bool
)
interface
{}
mac
func
(
macKey
[]
byte
)
hash
.
Hash
keyLen
int
macLen
int
ivLen
int
cipher
func
(
key
,
iv
[]
byte
,
isRead
bool
)
interface
{}
mac
func
(
macKey
[]
byte
)
hash
.
Hash
}
var
cipherSuites
=
map
[
uint16
]
*
cipherSuite
{
...
...
@@ -47,7 +49,7 @@ func hmacSHA1(key []byte) hash.Hash {
// ciphersuites and the id requested by the peer.
func
mutualCipherSuite
(
have
[]
uint16
,
want
uint16
)
(
suite
*
cipherSuite
,
id
uint16
)
{
for
_
,
id
:=
range
have
{
if
want
==
id
{
if
id
==
want
{
return
cipherSuites
[
id
],
id
}
}
...
...
src/pkg/crypto/tls/common.go
View file @
1a072f4b
...
...
@@ -147,7 +147,7 @@ func (c *Config) rootCAs() *CASet {
func
(
c
*
Config
)
cipherSuites
()
[]
uint16
{
s
:=
c
.
CipherSuites
if
len
(
s
)
==
0
{
if
s
==
nil
{
s
=
defaultCipherSuites
()
}
return
s
...
...
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