Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
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
nexedi
caddy
Commits
49c2807b
Commit
49c2807b
authored
Feb 27, 2016
by
Henrik Jonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build after
https://github.com/xenolf/lego/commit/0e26b
Fix up last-second changes Fixes #640
parent
da08c94a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
caddy/https/client.go
caddy/https/client.go
+10
-1
caddy/https/crypto_test.go
caddy/https/crypto_test.go
+3
-1
caddy/https/user.go
caddy/https/user.go
+2
-1
No files found.
caddy/https/client.go
View file @
49c2807b
...
...
@@ -34,7 +34,16 @@ var NewACMEClient = func(email string, allowPrompts bool) (*ACMEClient, error) {
}
// The client facilitates our communication with the CA server.
client
,
err
:=
acme
.
NewClient
(
CAUrl
,
&
leUser
,
rsaKeySizeToUse
)
var
kt
acme
.
KeyType
if
rsaKeySizeToUse
==
Rsa2048
{
kt
=
acme
.
RSA2048
}
else
if
rsaKeySizeToUse
==
Rsa4096
{
kt
=
acme
.
RSA4096
}
else
{
// TODO(hkjn): Support more types? Current changes are quick fix for #640.
return
nil
,
fmt
.
Errorf
(
"https: unsupported keysize"
)
}
client
,
err
:=
acme
.
NewClient
(
CAUrl
,
&
leUser
,
kt
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
caddy/https/crypto_test.go
View file @
49c2807b
...
...
@@ -11,7 +11,9 @@ import (
)
func
init
()
{
rsaKeySizeToUse
=
128
// make tests faster; small key size OK for testing
rsaKeySizeToUse
=
2048
// TODO(hkjn): Bring back support for small
// keys to speed up tests? Current changes
// are quick fix for #640.
}
func
TestSaveAndLoadRSAPrivateKey
(
t
*
testing
.
T
)
{
...
...
caddy/https/user.go
View file @
49c2807b
...
...
@@ -2,6 +2,7 @@ package https
import
(
"bufio"
"crypto"
"crypto/rand"
"crypto/rsa"
"encoding/json"
...
...
@@ -34,7 +35,7 @@ func (u User) GetRegistration() *acme.RegistrationResource {
}
// GetPrivateKey gets u's private key.
func
(
u
User
)
GetPrivateKey
()
*
rsa
.
PrivateKey
{
func
(
u
User
)
GetPrivateKey
()
crypto
.
PrivateKey
{
return
u
.
key
}
...
...
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