Skip to content

Commit

Permalink
Remove old global config and use new static config
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored and traefiker committed Nov 27, 2018
1 parent c39d21c commit 5d91c7e
Show file tree
Hide file tree
Showing 114 changed files with 2,483 additions and 3,644 deletions.
7 changes: 4 additions & 3 deletions acme/account.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package acme

import (
"context"
"crypto"
"crypto/rand"
"crypto/rsa"
Expand All @@ -15,8 +16,8 @@ import (
"time"

"github.com/containous/traefik/log"
acmeprovider "github.com/containous/traefik/old/provider/acme"
"github.com/containous/traefik/old/types"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/types"
"github.com/xenolf/lego/acme"
)

Expand Down Expand Up @@ -72,7 +73,7 @@ func (a *Account) Init() error {

// NewAccount creates an account
func NewAccount(email string, certs []*DomainsCertificate, keyTypeValue string) (*Account, error) {
keyType := acmeprovider.GetKeyType(keyTypeValue)
keyType := acmeprovider.GetKeyType(context.Background(), keyTypeValue)

// Create a user. New accounts need an email and private key to start
privateKey, err := rsa.GenerateKey(rand.Reader, 4096)
Expand Down
6 changes: 3 additions & 3 deletions acme/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"github.com/containous/staert"
"github.com/containous/traefik/cluster"
"github.com/containous/traefik/log"
acmeprovider "github.com/containous/traefik/old/provider/acme"
"github.com/containous/traefik/old/types"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/safe"
"github.com/containous/traefik/types"
"github.com/containous/traefik/version"
"github.com/eapache/channels"
"github.com/xenolf/lego/acme"
Expand Down Expand Up @@ -208,7 +208,7 @@ func (a *ACME) leadershipListener(elected bool) error {
needRegister = true
} else if len(account.KeyType) == 0 {
// Set the KeyType if not already defined in the account
account.KeyType = acmeprovider.GetKeyType(a.KeyType)
account.KeyType = acmeprovider.GetKeyType(context.Background(), a.KeyType)
}

a.client, err = a.buildACMEClient(account)
Expand Down
4 changes: 2 additions & 2 deletions acme/acme_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"testing"
"time"

acmeprovider "github.com/containous/traefik/old/provider/acme"
"github.com/containous/traefik/old/types"
acmeprovider "github.com/containous/traefik/provider/acme"
"github.com/containous/traefik/tls/generate"
"github.com/containous/traefik/types"
"github.com/stretchr/testify/assert"
"github.com/xenolf/lego/acme"
)
Expand Down
2 changes: 1 addition & 1 deletion acme/localStore.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"

"github.com/containous/traefik/log"
"github.com/containous/traefik/old/provider/acme"
"github.com/containous/traefik/provider/acme"
)

// LocalStore is a store using a file as storage
Expand Down
Loading

0 comments on commit 5d91c7e

Please sign in to comment.