Skip to content

Commit

Permalink
Merge "Fix Issue FAB-919 Failed to read CertificatePair" into v0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
christo4ferris authored and Gerrit Code Review committed Feb 8, 2017
2 parents 16debfe + 4491e28 commit e29f1b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions membersrvc/ca/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ func (ca *CA) readCertificates(id string, opt ...int64) (*sql.Rows, error) {
defer mutex.RUnlock()

if len(opt) > 0 && opt[0] != 0 {
return ca.db.Query("SELECT cert, kdfkey FROM Certificates WHERE id=? AND timestamp=? ORDER BY usage", id, opt[0])
return ca.db.Query("SELECT cert FROM Certificates WHERE id=? AND timestamp=? ORDER BY usage", id, opt[0])
}

return ca.db.Query("SELECT cert, kdfkey FROM Certificates WHERE id=?", id)
return ca.db.Query("SELECT cert FROM Certificates WHERE id=?", id)
}

func (ca *CA) readCertificateSets(id string, start, end int64) (*sql.Rows, error) {
Expand All @@ -502,7 +502,7 @@ func (ca *CA) readCertificateSets(id string, start, end int64) (*sql.Rows, error
mutex.RLock()
defer mutex.RUnlock()

return ca.db.Query("SELECT cert, kdfKey, timestamp FROM Certificates WHERE id=? AND timestamp BETWEEN ? AND ? ORDER BY timestamp", id, start, end)
return ca.db.Query("SELECT cert, timestamp FROM Certificates WHERE id=? AND timestamp BETWEEN ? AND ? ORDER BY timestamp", id, start, end)
}

func (ca *CA) readCertificateByHash(hash []byte) ([]byte, error) {
Expand Down

0 comments on commit e29f1b6

Please sign in to comment.