Skip to content

Commit

Permalink
Merge "Address CR comments for FAB-17000"
Browse files Browse the repository at this point in the history
  • Loading branch information
yacovm authored and Gerrit Code Review committed Nov 8, 2019
2 parents 2332eea + 649d563 commit 4952829
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/peer/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ func serve(args []string) error {
logger.Panicf("Failed to serialize the signing identity: %v", err)
}

// Log warnings if some certificate (e-cert, TLS certs) expires soon
expirationLogger := flogging.MustGetLogger("certmonitor")
crypto.TrackExpiration(
serverConfig.SecOpts.UseTLS,
serverConfig.SecOpts.Certificate,
cs.GetClientCertificate().Certificate,
signingIdentityBytes,
logger.Warnf, // This can be used to piggyback a metric event in the future
expirationLogger.Warnf, // This can be used to piggyback a metric event in the future
time.Now(),
time.AfterFunc)

Expand Down
3 changes: 2 additions & 1 deletion orderer/common/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,13 @@ func Main() {
logger.Panicf("Failed serializing signing identity: %v", err)
}

expirationLogger := flogging.MustGetLogger("certmonitor")
crypto.TrackExpiration(
serverConfig.SecOpts.UseTLS,
serverConfig.SecOpts.Certificate,
[][]byte{clusterClientConfig.SecOpts.Certificate},
identityBytes,
logger.Warnf, // This can be used to piggyback a metric event in the future
expirationLogger.Warnf, // This can be used to piggyback a metric event in the future
time.Now(),
time.AfterFunc)

Expand Down

0 comments on commit 4952829

Please sign in to comment.