Skip to content

Commit

Permalink
[ FAB-6963 ] Fix binary data in log file
Browse files Browse the repository at this point in the history
From a debug statement in genCRLHandler() from
lib/servergencrl.go, the crl is printed in raw binary.
This change would print the standard string representation
of a []byte stream:

    - log.Debugf("Successfully generated CRL: %s\n", crl)
    + log.Debugf("Successfully generated CRL: %v\n", crl)

Change-Id: I75e2583449c0b4c087ade3540dc138931ea5b5c2
Signed-off-by: Allen Bailey <eabailey@us.ibm.com>
  • Loading branch information
rennman committed Nov 13, 2017
1 parent 1778aeb commit 69d2d18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ func (ca *CA) initUserRegistry() error {
if ldapCfg.Enabled {
// Use LDAP for the user registry
ca.registry, err = ldap.NewClient(ldapCfg, ca.server.csp)
log.Debugf("Initialized LDAP identity registry; err=%s", err)
log.Debug("Initialized LDAP identity registry; err=", err)
if err == nil {
log.Info("Successfully initialized LDAP client")
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (c *Client) StoreMyIdentity(cert []byte) error {

// LoadIdentity loads an identity from disk
func (c *Client) LoadIdentity(keyFile, certFile string) (*Identity, error) {
log.Debug("Loading identity: keyFile=%s, certFile=%s", keyFile, certFile)
log.Debugf("Loading identity: keyFile=%s, certFile=%s", keyFile, certFile)
err := c.Init()
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion lib/servergencrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func genCRLHandler(ctx *serverRequestContext) (interface{}, error) {
if err != nil {
return nil, err
}
log.Debugf("Successfully generated CRL: %s\n", crl)
log.Debugf("Successfully generated CRL")

resp := &genCRLResponseNet{CRL: crl}
return resp, nil
Expand Down

0 comments on commit 69d2d18

Please sign in to comment.