@@ -14,7 +14,6 @@ import (
1414
1515 "github.com/jmhodges/clock"
1616 "github.com/prometheus/client_golang/prometheus"
17- "gopkg.in/go-gorp/gorp.v2"
1817 jose "gopkg.in/square/go-jose.v2"
1918
2019 "github.com/letsencrypt/boulder/core"
@@ -53,12 +52,6 @@ type SQLStorageAuthority struct {
5352 rateLimitWriteErrors prometheus.Counter
5453}
5554
56- func digest256 (data []byte ) []byte {
57- d := sha256 .New ()
58- _ , _ = d .Write (data ) // Never returns an error
59- return d .Sum (nil )
60- }
61-
6255// orderFQDNSet contains the SHA256 hash of the lowercased, comma joined names
6356// from a new-order request, along with the corresponding orderID, the
6457// registration ID, and the order expiry. This is used to find
@@ -71,16 +64,6 @@ type orderFQDNSet struct {
7164 Expires time.Time
7265}
7366
74- const (
75- authorizationTable = "authz"
76- pendingAuthorizationTable = "pendingAuthorizations"
77- )
78-
79- var authorizationTables = []string {
80- authorizationTable ,
81- pendingAuthorizationTable ,
82- }
83-
8467// NewSQLStorageAuthority provides persistence using a SQL backend for
8568// Boulder. It will modify the given gorp.DbMap by adding relevant tables.
8669func NewSQLStorageAuthority (
@@ -111,28 +94,6 @@ func NewSQLStorageAuthority(
11194 return ssa , nil
11295}
11396
114- func statusIsPending (status core.AcmeStatus ) bool {
115- return status == core .StatusPending || status == core .StatusProcessing || status == core .StatusUnknown
116- }
117-
118- func existingPending (dbMap db.OneSelector , id string ) bool {
119- var count int64
120- _ = dbMap .SelectOne (& count , "SELECT count(*) FROM pendingAuthorizations WHERE id = :id" , map [string ]interface {}{"id" : id })
121- return count > 0
122- }
123-
124- func existingFinal (dbMap db.OneSelector , id string ) bool {
125- var count int64
126- _ = dbMap .SelectOne (& count , "SELECT count(*) FROM authz WHERE id = :id" , map [string ]interface {}{"id" : id })
127- return count > 0
128- }
129-
130- func existingRegistration (tx * gorp.Transaction , id int64 ) bool {
131- var count int64
132- _ = tx .SelectOne (& count , "SELECT count(*) FROM registrations WHERE id = :id" , map [string ]interface {}{"id" : id })
133- return count > 0
134- }
135-
13697// GetRegistration obtains a Registration by ID
13798func (ssa * SQLStorageAuthority ) GetRegistration (ctx context.Context , id int64 ) (core.Registration , error ) {
13899 const query = "WHERE id = ?"
0 commit comments