Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
dd1e901d
Commit
dd1e901d
authored
Apr 11, 2017
by
rithu john
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server/rotation.go: avoid displaying the "keys already rotated" error
parent
c3cafc8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
rotation.go
server/rotation.go
+4
-2
No files found.
server/rotation.go
View file @
dd1e901d
...
...
@@ -5,7 +5,6 @@ import (
"crypto/rand"
"crypto/rsa"
"encoding/hex"
"errors"
"fmt"
"io"
"time"
...
...
@@ -125,8 +124,11 @@ func (k keyRotater) rotate() error {
var
nextRotation
time
.
Time
err
=
k
.
Storage
.
UpdateKeys
(
func
(
keys
storage
.
Keys
)
(
storage
.
Keys
,
error
)
{
tNow
:=
k
.
now
()
// if you are running multiple instances of dex, another instance
// could have already rotated the keys.
if
tNow
.
Before
(
keys
.
NextRotation
)
{
return
storage
.
Keys
{},
errors
.
New
(
"keys already rotated"
)
return
storage
.
Keys
{},
nil
}
expired
:=
func
(
key
storage
.
VerificationKey
)
bool
{
...
...
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