Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cmd/bad-key-revoker/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ func insertRegistration(t *testing.T, dbMap *db.WrappedMap, fc clock.Clock, addr
}
res, err := dbMap.ExecContext(
context.Background(),
"INSERT INTO registrations (jwk, jwk_sha256, contact, agreement, initialIP, createdAt, status, LockCol) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO registrations (jwk, jwk_sha256, contact, agreement, createdAt, status, LockCol) VALUES (?, ?, ?, ?, ?, ?, ?)",
[]byte{},
fmt.Sprintf("%x", jwkHash),
contactStr,
"yes",
[]byte{},
fc.Now(),
string(core.StatusValid),
0,
Expand Down
132 changes: 61 additions & 71 deletions core/proto/core.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/proto/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ message Registration {
repeated string contact = 3;
bool contactsPresent = 4;
string agreement = 5;
bytes initialIP = 6;
reserved 7; // Previously createdAtNS
google.protobuf.Timestamp createdAt = 9;
string status = 8;
Expand Down
21 changes: 5 additions & 16 deletions sa/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"errors"
"fmt"
"math"
"net"
"net/url"
"slices"
"strconv"
Expand Down Expand Up @@ -274,18 +273,11 @@ type issuedNameModel struct {

// regModel is the description of a core.Registration in the database before
type regModel struct {
ID int64 `db:"id"`
Key []byte `db:"jwk"`
KeySHA256 string `db:"jwk_sha256"`
Contact string `db:"contact"`
Agreement string `db:"agreement"`
// InitialIP is stored as sixteen binary bytes, regardless of whether it
// represents a v4 or v6 IP address.
//
// Deprecated: This field is no longer used and will be removed from the
// database schema in a future release. Although deprecated, this column
// remains NOT NULL in the database, so a value must still be provided.
InitialIP []byte `db:"initialIp"`
ID int64 `db:"id"`
Key []byte `db:"jwk"`
KeySHA256 string `db:"jwk_sha256"`
Contact string `db:"contact"`
Agreement string `db:"agreement"`
CreatedAt time.Time `db:"createdAt"`
LockCol int64
Status string `db:"status"`
Expand Down Expand Up @@ -328,9 +320,6 @@ func registrationPbToModel(reg *corepb.Registration) (*regModel, error) {
KeySHA256: sha,
Contact: string(jsonContact),
Agreement: reg.Agreement,
// Although deprecated, this column remains NOT NULL in the database, so
// a value must still be provided.
InitialIP: net.ParseIP("0.0.0.0").To16(),
CreatedAt: createdAt,
Status: reg.Status,
}, nil
Expand Down
3 changes: 0 additions & 3 deletions wfe2/wfe.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,6 @@ func (wfe *WebFrontEndImpl) NewAccount(
ContactsPresent: contactsPresent,
Agreement: wfe.SubscriberAgreementURL,
Key: keyBytes,
// TODO(#7671): This must remain until InitialIP is removed from
// corepb.Registration.
InitialIP: net.ParseIP("0.0.0.0").To16(),
}

refundLimits, err := wfe.checkNewAccountLimits(ctx, ip)
Expand Down
Loading