repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/obs_conf.go | third-party/github.com/letsencrypt/boulder/observer/obs_conf.go | package observer
import (
"errors"
"fmt"
"net"
"strconv"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/observer/probers"
)
var (
countMonitors = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "obs_monitors",
Help: "deta... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/observer.go | third-party/github.com/letsencrypt/boulder/observer/observer.go | package observer
import (
"context"
"github.com/letsencrypt/boulder/cmd"
blog "github.com/letsencrypt/boulder/log"
_ "github.com/letsencrypt/boulder/observer/probers/crl"
_ "github.com/letsencrypt/boulder/observer/probers/dns"
_ "github.com/letsencrypt/boulder/observer/probers/http"
_ "github.com/letsencrypt/b... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/mon_conf.go | third-party/github.com/letsencrypt/boulder/observer/mon_conf.go | package observer
import (
"errors"
"time"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v3"
"github.com/letsencrypt/boulder/config"
"github.com/letsencrypt/boulder/observer/probers"
)
// MonConf is exported to receive YAML configuration in `ObsConf`.
type MonConf struct {
Period config.Du... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/mon_conf_test.go | third-party/github.com/letsencrypt/boulder/observer/mon_conf_test.go | package observer
import (
"testing"
"time"
"github.com/letsencrypt/boulder/config"
"github.com/letsencrypt/boulder/test"
)
func TestMonConf_validatePeriod(t *testing.T) {
type fields struct {
Period config.Duration
}
tests := []struct {
name string
fields fields
wantErr bool
}{
{"valid", fields... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/monitor.go | third-party/github.com/letsencrypt/boulder/observer/monitor.go | package observer
import (
"strconv"
"time"
blog "github.com/letsencrypt/boulder/log"
"github.com/letsencrypt/boulder/observer/probers"
)
type monitor struct {
period time.Duration
prober probers.Prober
}
// start spins off a 'Prober' goroutine on an interval of `m.period`
// with a timeout of half `m.period`
... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/prober.go | third-party/github.com/letsencrypt/boulder/observer/probers/prober.go | package probers
import (
"fmt"
"strings"
"time"
"github.com/letsencrypt/boulder/cmd"
"github.com/prometheus/client_golang/prometheus"
)
var (
// Registry is the global mapping of all `Configurer` types. Types
// are added to this mapping on import by including a call to
// `Register` in their `init` function... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls_conf.go | package probers
import (
"fmt"
"net"
"net/url"
"strconv"
"strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
)
const (
notAfterName = "obs_tls_not_after"
notBeforeName = "obs_tls_not_before"
reasonName ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls_conf_test.go | third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls_conf_test.go | package probers
import (
"reflect"
"testing"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v3"
"github.com/letsencrypt/boulder/observer/probers"
)
func TestTLSConf_MakeProber(t *testing.T) {
goodHostname, goodRootCN, goodResponse := "example.com", "ISRG Root X1", "valid"
colls := TLSConf{}.... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls.go | third-party/github.com/letsencrypt/boulder/observer/probers/tls/tls.go | package probers
import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/base64"
"errors"
"fmt"
"io"
"net"
"net/http"
"time"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/crypto/ocsp"
"github.com/letsencrypt/boulder/observer/obsdialer"
)
type reason int
const (
none reason = iota
int... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/tcp/tcp.go | third-party/github.com/letsencrypt/boulder/observer/probers/tcp/tcp.go | package tcp
import (
"context"
"time"
"github.com/letsencrypt/boulder/observer/obsdialer"
)
type TCPProbe struct {
hostport string
}
// Name returns a string that uniquely identifies the monitor.
func (p TCPProbe) Name() string {
return p.hostport
}
// Kind returns a name that uniquely identifies the `Kind` ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/tcp/tcp_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/tcp/tcp_conf.go | package tcp
import (
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
"github.com/prometheus/client_golang/prometheus"
)
// TCPConf is exported to receive YAML configuration.
type TCPConf struct {
Hostport string `yaml:"hostport"`
}
// Kind returns a name that uniquel... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/mock/mock_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/mock/mock_conf.go | package probers
import (
"errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/config"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
)
type MockConfigurer struct {
Valid bool `yaml:"valid"`
ErrMsg string ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/mock/mock_prober.go | third-party/github.com/letsencrypt/boulder/observer/probers/mock/mock_prober.go | package probers
import (
"time"
"github.com/letsencrypt/boulder/config"
)
type MockProber struct {
name string
kind string
took config.Duration
success bool
}
func (p MockProber) Name() string {
return p.name
}
func (p MockProber) Kind() string {
return p.kind
}
func (p MockProber) Probe(timeout ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl_conf.go | package probers
import (
"fmt"
"net/url"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
)
const (
nextUpdateName = "obs_crl_next_update"
thisUpdateName = "obs_crl_this_update"
certCountName = "obs_crl_revoked_ce... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl.go | third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl.go | package probers
import (
"crypto/x509"
"io"
"net/http"
"slices"
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/crl/idp"
)
// CRLProbe is the exported 'Prober' object for monitors configured to
// monitor CRL availability & characteristics.
type CRLProbe struct {
url ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl_conf_test.go | third-party/github.com/letsencrypt/boulder/observer/probers/crl/crl_conf_test.go | package probers
import (
"testing"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v3"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/test"
)
func TestCRLConf_MakeProber(t *testing.T) {
conf := CRLConf{}
colls := conf.Instrument()
badColl := prometheus.Coll... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns.go | third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns.go | package probers
import (
"fmt"
"time"
"github.com/miekg/dns"
)
// DNSProbe is the exported 'Prober' object for monitors configured to
// perform DNS requests.
type DNSProbe struct {
proto string
server string
recurse bool
qname string
qtype uint16
}
// Name returns a string that uniquely identifies t... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns_conf.go | package probers
import (
"fmt"
"net"
"net/netip"
"strconv"
"strings"
"github.com/miekg/dns"
"github.com/prometheus/client_golang/prometheus"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
)
var (
validQTypes = map[string]uint16{"A": 1, "TXT": 16, "AAAA": 28, ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns_conf_test.go | third-party/github.com/letsencrypt/boulder/observer/probers/dns/dns_conf_test.go | package probers
import (
"reflect"
"testing"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/test"
"gopkg.in/yaml.v3"
)
func TestDNSConf_validateServer(t *testing.T) {
type fields struct {
Server string
}
tests := []struct {
name string
fields fields
wantErr bool... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/http/http_conf_test.go | third-party/github.com/letsencrypt/boulder/observer/probers/http/http_conf_test.go | package probers
import (
"reflect"
"testing"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/test"
"gopkg.in/yaml.v3"
)
func TestHTTPConf_MakeProber(t *testing.T) {
type fields struct {
URL string
RCodes []int
}
tests := []struct {
name string
fields fields
... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/http/http_conf.go | third-party/github.com/letsencrypt/boulder/observer/probers/http/http_conf.go | package probers
import (
"fmt"
"net/url"
"github.com/letsencrypt/boulder/observer/probers"
"github.com/letsencrypt/boulder/strictyaml"
"github.com/prometheus/client_golang/prometheus"
)
// HTTPConf is exported to receive YAML configuration.
type HTTPConf struct {
URL string `yaml:"url"`
RCodes []int ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/probers/http/http.go | third-party/github.com/letsencrypt/boulder/observer/probers/http/http.go | package probers
import (
"context"
"crypto/tls"
"fmt"
"net/http"
"time"
"github.com/letsencrypt/boulder/observer/obsdialer"
)
// HTTPProbe is the exported 'Prober' object for monitors configured to
// perform HTTP requests.
type HTTPProbe struct {
url string
rcodes []int
useragent string
insecure ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/observer/obsdialer/obsdialer.go | third-party/github.com/letsencrypt/boulder/observer/obsdialer/obsdialer.go | // package obsdialer contains a custom dialer for use in observers.
package obsdialer
import "net"
// Dialer is a custom dialer for use in observers. It disables IPv6-to-IPv4
// fallback so we don't mask failures of IPv6 connectivity.
var Dialer = net.Dialer{
FallbackDelay: -1, // Disable IPv6-to-IPv4 fallback
}
| go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/publisher/publisher_test.go | third-party/github.com/letsencrypt/boulder/publisher/publisher_test.go | package publisher
import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/base64"
"encoding/json"
"fmt"
"math/big"
"net"
"net/http"
"net/http/httptest"
"net/url"
"strconv"
"strings"
"sync/atomic"
"testing"
"time"
ct "github.com/... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/publisher/publisher.go | third-party/github.com/letsencrypt/boulder/publisher/publisher.go | package publisher
import (
"context"
"crypto/ecdsa"
"crypto/rand"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"encoding/asn1"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"math/big"
"net/http"
"net/url"
"strings"
"sync"
"time"
ct "github.com/google/certificate-transparency-go"
ctClient "github.c... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/publisher/proto/publisher.pb.go | third-party/github.com/letsencrypt/boulder/publisher/proto/publisher.pb.go | // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.5
// protoc v3.20.1
// source: publisher.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/publisher/proto/publisher_grpc.pb.go | third-party/github.com/letsencrypt/boulder/publisher/proto/publisher_grpc.pb.go | // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v3.20.1
// source: publisher.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/rollback.go | third-party/github.com/letsencrypt/boulder/db/rollback.go | package db
import (
"fmt"
)
// RollbackError is a combination of a database error and the error, if any,
// encountered while trying to rollback the transaction.
type RollbackError struct {
Err error
RollbackErr error
}
// Error implements the error interface
func (re *RollbackError) Error() string {
if ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/map_test.go | third-party/github.com/letsencrypt/boulder/db/map_test.go | package db
import (
"context"
"database/sql"
"errors"
"fmt"
"testing"
"github.com/letsencrypt/borp"
"github.com/go-sql-driver/mysql"
"github.com/letsencrypt/boulder/core"
"github.com/letsencrypt/boulder/test"
"github.com/letsencrypt/boulder/test/vars"
)
func TestErrDatabaseOpError(t *testing.T) {
testEr... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/transaction.go | third-party/github.com/letsencrypt/boulder/db/transaction.go | package db
import "context"
// txFunc represents a function that does work in the context of a transaction.
type txFunc func(tx Executor) (interface{}, error)
// WithTransaction runs the given function in a transaction, rolling back if it
// returns an error and committing if not. The provided context is also attach... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/interfaces.go | third-party/github.com/letsencrypt/boulder/db/interfaces.go | package db
import (
"context"
"database/sql"
"errors"
"reflect"
"github.com/letsencrypt/borp"
)
// These interfaces exist to aid in mocking database operations for unit tests.
//
// By convention, any function that takes a OneSelector, Selector,
// Inserter, Execer, or SelectExecer as as an argument expects
// ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/rollback_test.go | third-party/github.com/letsencrypt/boulder/db/rollback_test.go | package db
import (
"context"
"testing"
berrors "github.com/letsencrypt/boulder/errors"
"github.com/letsencrypt/boulder/test"
)
func TestRollback(t *testing.T) {
ctx := context.Background()
dbMap := testDbMap(t)
tx, _ := dbMap.BeginTx(ctx)
// Commit the transaction so that a subsequent rollback will always ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/qmarks.go | third-party/github.com/letsencrypt/boulder/db/qmarks.go | package db
import "strings"
// QuestionMarks returns a string consisting of N question marks, joined by
// commas. If n is <= 0, panics.
func QuestionMarks(n int) string {
if n <= 0 {
panic("db.QuestionMarks called with n <=0")
}
var qmarks strings.Builder
qmarks.Grow(2 * n)
for i := range n {
if i == 0 {
... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/multi_test.go | third-party/github.com/letsencrypt/boulder/db/multi_test.go | package db
import (
"testing"
"github.com/letsencrypt/boulder/test"
)
func TestNewMulti(t *testing.T) {
_, err := NewMultiInserter("", []string{"colA"})
test.AssertError(t, err, "Empty table name should fail")
_, err = NewMultiInserter("myTable", nil)
test.AssertError(t, err, "Empty fields list should fail")
... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/multi.go | third-party/github.com/letsencrypt/boulder/db/multi.go | package db
import (
"context"
"fmt"
"strings"
)
// MultiInserter makes it easy to construct a
// `INSERT INTO table (...) VALUES ...;`
// query which inserts multiple rows into the same table. It can also execute
// the resulting query.
type MultiInserter struct {
// These are validated by the constructor as cont... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/map.go | third-party/github.com/letsencrypt/boulder/db/map.go | package db
import (
"context"
"database/sql"
"errors"
"fmt"
"reflect"
"regexp"
"github.com/go-sql-driver/mysql"
"github.com/letsencrypt/borp"
)
// ErrDatabaseOp wraps an underlying err with a description of the operation
// that was being performed when the error occurred (insert, select, select
// one, exec... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/gorm_test.go | third-party/github.com/letsencrypt/boulder/db/gorm_test.go | package db
import (
"testing"
"github.com/letsencrypt/boulder/test"
)
func TestValidMariaDBUnquotedIdentifier(t *testing.T) {
test.AssertError(t, validMariaDBUnquotedIdentifier("12345"), "expected error for 12345")
test.AssertError(t, validMariaDBUnquotedIdentifier("12345e"), "expected error for 12345e")
test.A... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/qmarks_test.go | third-party/github.com/letsencrypt/boulder/db/qmarks_test.go | package db
import (
"testing"
"github.com/letsencrypt/boulder/test"
)
func TestQuestionMarks(t *testing.T) {
test.AssertEquals(t, QuestionMarks(1), "?")
test.AssertEquals(t, QuestionMarks(2), "?,?")
test.AssertEquals(t, QuestionMarks(3), "?,?,?")
}
func TestQuestionMarksPanic(t *testing.T) {
defer func() { _ ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/db/gorm.go | third-party/github.com/letsencrypt/boulder/db/gorm.go | package db
import (
"context"
"database/sql"
"fmt"
"reflect"
"regexp"
"strings"
)
// Characters allowed in an unquoted identifier by MariaDB.
// https://mariadb.com/kb/en/identifier-names/#unquoted
var mariaDBUnquotedIdentifierRE = regexp.MustCompile("^[0-9a-zA-Z$_]+$")
func validMariaDBUnquotedIdentifier(s st... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/redis/metrics.go | third-party/github.com/letsencrypt/boulder/redis/metrics.go | package redis
import (
"errors"
"slices"
"strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/redis/go-redis/v9"
)
// An interface satisfied by *redis.ClusterClient and also by a mock in our tests.
type poolStatGetter interface {
PoolStats() *redis.PoolStats
}
var _ poolStatGetter = (*redis.... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/redis/config.go | third-party/github.com/letsencrypt/boulder/redis/config.go | package redis
import (
"fmt"
"github.com/prometheus/client_golang/prometheus"
"github.com/redis/go-redis/extra/redisotel/v9"
"github.com/redis/go-redis/v9"
"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/config"
blog "github.com/letsencrypt/boulder/log"
)
// Config contains the configura... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/redis/lookup_test.go | third-party/github.com/letsencrypt/boulder/redis/lookup_test.go | package redis
import (
"context"
"testing"
"time"
"github.com/letsencrypt/boulder/cmd"
blog "github.com/letsencrypt/boulder/log"
"github.com/letsencrypt/boulder/metrics"
"github.com/letsencrypt/boulder/test"
"github.com/redis/go-redis/v9"
)
func newTestRedisRing() *redis.Ring {
CACertFile := "../test/certs... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/redis/lookup.go | third-party/github.com/letsencrypt/boulder/redis/lookup.go | package redis
import (
"context"
"errors"
"fmt"
"net"
"strings"
"time"
"github.com/letsencrypt/boulder/cmd"
blog "github.com/letsencrypt/boulder/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/redis/go-redis/v9"
)
var ErrNoShardsResolved = errors.New("0 shards were resolved")
// lookup ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/redis/metrics_test.go | third-party/github.com/letsencrypt/boulder/redis/metrics_test.go | package redis
import (
"strings"
"testing"
"github.com/prometheus/client_golang/prometheus"
"github.com/redis/go-redis/v9"
"github.com/letsencrypt/boulder/metrics"
)
type mockPoolStatGetter struct{}
var _ poolStatGetter = mockPoolStatGetter{}
func (mockPoolStatGetter) PoolStats() *redis.PoolStats {
return &... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/metrics/scope.go | third-party/github.com/letsencrypt/boulder/metrics/scope.go | package metrics
import "github.com/prometheus/client_golang/prometheus"
// InternetFacingBuckets are the histogram buckets that should be used when
// measuring latencies that involve traversing the public internet.
var InternetFacingBuckets = []float64{.1, .5, 1, 5, 10, 30, 45}
// noopRegisterer mocks prometheus.Re... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/metrics/measured_http/http_test.go | third-party/github.com/letsencrypt/boulder/metrics/measured_http/http_test.go | package measured_http
import (
"net/http"
"net/http/httptest"
"net/url"
"testing"
"time"
"github.com/jmhodges/clock"
"github.com/prometheus/client_golang/prometheus"
io_prometheus_client "github.com/prometheus/client_model/go"
)
type sleepyHandler struct {
clk clock.FakeClock
}
func (h sleepyHandler) Serve... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/metrics/measured_http/http.go | third-party/github.com/letsencrypt/boulder/metrics/measured_http/http.go | package measured_http
import (
"net/http"
"strconv"
"github.com/jmhodges/clock"
"github.com/prometheus/client_golang/prometheus"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)
// responseWriterWithStatus satisfies http.ResponseWriter, but keeps track of the
// status code for gathering stats.... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/csr/csr.go | third-party/github.com/letsencrypt/boulder/csr/csr.go | package csr
import (
"context"
"crypto"
"crypto/x509"
"errors"
"net/netip"
"strings"
"github.com/letsencrypt/boulder/core"
berrors "github.com/letsencrypt/boulder/errors"
"github.com/letsencrypt/boulder/goodkey"
"github.com/letsencrypt/boulder/identifier"
)
// maxCNLength is the maximum length allowed for ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/csr/csr_test.go | third-party/github.com/letsencrypt/boulder/csr/csr_test.go | package csr
import (
"context"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"errors"
"net"
"net/netip"
"net/url"
"strings"
"testing"
"github.com/letsencrypt/boulder/core"
berrors "github.com/letsencrypt/boulder/errors"
"github.com/letsencrypt/boulder/features"
"github.co... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/pkcs11helpers/helpers_test.go | third-party/github.com/letsencrypt/boulder/pkcs11helpers/helpers_test.go | package pkcs11helpers
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/asn1"
"errors"
"math/big"
"strings"
"testing"
"github.com/letsencrypt/boulder/test"
"github.com/miekg/pkcs11"
)
func TestGetECDSAPublicKey(t *testing.T) {
ctx := &MockC... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/pkcs11helpers/helpers.go | third-party/github.com/letsencrypt/boulder/pkcs11helpers/helpers.go | package pkcs11helpers
import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rsa"
"encoding/asn1"
"errors"
"fmt"
"io"
"math/big"
"github.com/miekg/pkcs11"
)
type PKCtx interface {
GenerateKeyPair(pkcs11.SessionHandle, []*pkcs11.Mechanism, []*pkcs11.Attribute, []*pkcs11.Attribute) (pkcs11.ObjectHandle,... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/asserts.go | third-party/github.com/letsencrypt/boulder/test/asserts.go | package test
import (
"bytes"
"encoding/base64"
"encoding/json"
"errors"
"reflect"
"strings"
"testing"
"time"
"github.com/prometheus/client_golang/prometheus"
io_prometheus_client "github.com/prometheus/client_model/go"
)
// Assert a boolean
func Assert(t *testing.T, result bool, message string) {
t.Helpe... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/certs.go | third-party/github.com/letsencrypt/boulder/test/certs.go | package test
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/hex"
"encoding/pem"
"errors"
"fmt"
"math/big"
"net"
"os"
"testing"
"time"
"github.com/jmhodges/clock"
)
// LoadSigner loads a PEM private key specified by filename or returns an... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/db.go | third-party/github.com/letsencrypt/boulder/test/db.go | package test
import (
"context"
"database/sql"
"fmt"
"io"
"testing"
)
var (
_ CleanUpDB = &sql.DB{}
)
// CleanUpDB is an interface with only what is needed to delete all
// rows in all tables in a database plus close the database
// connection. It is satisfied by *sql.DB.
type CleanUpDB interface {
BeginTx(co... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/mockdns.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/mockdns.go | // addDNS01 handles an HTTP POST request to add a new DNS-01 challenge TXT
package main
import (
"net/http"
"strings"
"github.com/letsencrypt/challtestsrv"
)
// setDefaultDNSIPv4 handles an HTTP POST request to set the default IPv4
// address used for all A query responses that do not match more-specific mocked
/... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/httpone.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/httpone.go | package main
import "net/http"
// addHTTP01 handles an HTTP POST request to add a new HTTP-01 challenge
// response for a given token.
//
// The POST body is expected to have two non-empty parameters:
// "token" - the HTTP-01 challenge token to add the mock HTTP-01 response under
// in the `/.well-known/acme-challeng... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/dnsone.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/dnsone.go | package main
import "net/http"
// addDNS01 handles an HTTP POST request to add a new DNS-01 challenge TXT
// record for a given host/value.
//
// The POST body is expected to have two non-empty parameters:
// "host" - the hostname to add the mock TXT response under.
// "value" - the key authorization value to return ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/history.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/history.go | package main
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"github.com/letsencrypt/challtestsrv"
)
// clearHistory handles an HTTP POST request to clear the challenge server
// request history for a specific hostname and type of event.
//
// The POST body is expected to have two parameters:
// "host" - the... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/tlsalpnone.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/tlsalpnone.go | package main
import "net/http"
// addTLSALPN01 handles an HTTP POST request to add a new TLS-ALPN-01 challenge
// response certificate for a given host.
//
// The POST body is expected to have two non-empty parameters:
// "host" - the hostname to add the challenge response certificate for.
// "content" - the key auth... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/http.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/http.go | package main
import (
"encoding/json"
"errors"
"io"
"net/http"
)
// mustParsePOST will attempt to read a JSON POST body from the provided request
// and unmarshal it into the provided ob. If an error occurs at any point it
// will be returned.
func mustParsePOST(ob interface{}, request *http.Request) error {
jso... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/chall-test-srv/main.go | third-party/github.com/letsencrypt/boulder/test/chall-test-srv/main.go | package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"strings"
"time"
"github.com/letsencrypt/challtestsrv"
"github.com/letsencrypt/boulder/cmd"
)
// managementServer is a small HTTP server that can control a challenge server,
// adding and deleting challenge responses as required
type manag... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/wfe_test.go | third-party/github.com/letsencrypt/boulder/test/integration/wfe_test.go | //go:build integration
package integration
import (
"io"
"net/http"
"testing"
"github.com/letsencrypt/boulder/test"
)
// TestWFECORS is a small integration test that checks that the
// Access-Control-Allow-Origin header is returned for a GET request to the
// directory endpoint that has an Origin request header... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/srv_resolver_test.go | third-party/github.com/letsencrypt/boulder/test/integration/srv_resolver_test.go | //go:build integration
package integration
import (
"context"
"testing"
"github.com/jmhodges/clock"
"google.golang.org/protobuf/types/known/emptypb"
"github.com/letsencrypt/boulder/cmd"
bgrpc "github.com/letsencrypt/boulder/grpc"
"github.com/letsencrypt/boulder/metrics"
"github.com/letsencrypt/boulder/nonce... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/cert_storage_failed_test.go | third-party/github.com/letsencrypt/boulder/test/integration/cert_storage_failed_test.go | //go:build integration
package integration
import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"database/sql"
"errors"
"fmt"
"os"
"os/exec"
"path"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
_ "github.com/go-sql-driver/mysql"
"golang.org/x/crypto/ocsp"
"g... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/key_rollover_test.go | third-party/github.com/letsencrypt/boulder/test/integration/key_rollover_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
// TestAccountKeyChange tests that the whole account key rollover process works,
// including between different kin... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/common_test.go | third-party/github.com/letsencrypt/boulder/test/integration/common_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/hex"
"fmt"
"net"
"os"
challTestSrvClient "github.com/letsencrypt/boulder/test/chall-test-srv-client"
"github.com/eggsampler/acme/v3"
)
var testSr... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/ratelimit_test.go | third-party/github.com/letsencrypt/boulder/test/integration/ratelimit_test.go | //go:build integration
package integration
import (
"crypto/rand"
"encoding/hex"
"fmt"
"os"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
func TestDuplicateFQDNRateLimit(t *testing.T) {
t.Parallel()
idents := []acme.Identifier{{Type: "dns", Value: random_domain()}}
//... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/errors_test.go | third-party/github.com/letsencrypt/boulder/test/integration/errors_test.go | //go:build integration
package integration
import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"slices"
"strings"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/go-jose/go-jose/v4"
"github.com/letsencrypt/b... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/akamai_purger_drain_queue_test.go | third-party/github.com/letsencrypt/boulder/test/integration/akamai_purger_drain_queue_test.go | //go:build integration
package integration
import (
"bytes"
"context"
"fmt"
"os"
"os/exec"
"syscall"
"testing"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/balancer/roundrobin"
"google.golang.org/grpc/connectivity"
akamaipb "github.com/letsencrypt/boulder/akamai/proto"
"github.com/letsencryp... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/observer_test.go | third-party/github.com/letsencrypt/boulder/test/integration/observer_test.go | //go:build integration
package integration
import (
"bufio"
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"encoding/pem"
"fmt"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
)
func streamOutput(t *testing.T, c *ex... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/revocation_test.go | third-party/github.com/letsencrypt/boulder/test/integration/revocation_test.go | //go:build integration
package integration
import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"encoding/hex"
"encoding/json"
"encoding/pem"
"fmt"
"io"
"net/http"
"os"
"os/exec"
"path"
"strings"
"sync"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"golang.org/x/crypt... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/email_exporter_test.go | third-party/github.com/letsencrypt/boulder/test/integration/email_exporter_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"slices"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
// randomDomain creates a random domain name f... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/bad_key_test.go | third-party/github.com/letsencrypt/boulder/test/integration/bad_key_test.go | //go:build integration
package integration
import (
"crypto/x509"
"encoding/pem"
"os"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
// TestFermat ensures that a certificate public key which can be factored using
// less than 100 rounds of Fermat's Algorithm is rejected.
fu... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/nonce_test.go | third-party/github.com/letsencrypt/boulder/test/integration/nonce_test.go | //go:build integration
package integration
import (
"context"
"testing"
"github.com/jmhodges/clock"
"google.golang.org/grpc/status"
"github.com/letsencrypt/boulder/cmd"
bgrpc "github.com/letsencrypt/boulder/grpc"
nb "github.com/letsencrypt/boulder/grpc/noncebalancer"
"github.com/letsencrypt/boulder/metrics"... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/account_test.go | third-party/github.com/letsencrypt/boulder/test/integration/account_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"strings"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/core"
)
// TestNewAccount tests that various new-account requests are handled correctly.
// It does not test malformed accoun... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/otel_test.go | third-party/github.com/letsencrypt/boulder/test/integration/otel_test.go | //go:build integration
package integration
import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/propagation"
sdktrace "go.opentelemet... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/subordinate_ca_chains_test.go | third-party/github.com/letsencrypt/boulder/test/integration/subordinate_ca_chains_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"strings"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
func TestSubordinateCAChainsServedByWFE(t *testing.T) {
t.Parallel()
client, err := makeClient("mailto:example@let... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/ocsp_test.go | third-party/github.com/letsencrypt/boulder/test/integration/ocsp_test.go | //go:build integration
package integration
import (
"strings"
"testing"
"golang.org/x/crypto/ocsp"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/core"
ocsp_helper "github.com/letsencrypt/boulder/test/ocsp/helper"
)
func TestOCSPHappyPath(t *testing.T) {
t.Parallel()
cert, err := authAndI... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/crl_test.go | third-party/github.com/letsencrypt/boulder/test/integration/crl_test.go | //go:build integration
package integration
import (
"bytes"
"context"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"database/sql"
"errors"
"fmt"
"io"
"net"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"sync"
"syscall"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/validation_test.go | third-party/github.com/letsencrypt/boulder/test/integration/validation_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"database/sql"
"slices"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/miekg/dns"
challtestsrvclient "github.com/letsencrypt/boulder/test/chall-test-srv-client"
"github.com/letsencr... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/common_mock.go | third-party/github.com/letsencrypt/boulder/test/integration/common_mock.go | //go:build integration
package integration
import (
"bytes"
"crypto/x509"
"encoding/base64"
"encoding/json"
"fmt"
"net/http"
berrors "github.com/letsencrypt/boulder/errors"
)
var ctSrvPorts = []int{4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609}
// ctAddRejectHost adds a domain to all of the CT ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/pausing_test.go | third-party/github.com/letsencrypt/boulder/test/integration/pausing_test.go | //go:build integration
package integration
import (
"context"
"strconv"
"strings"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/jmhodges/clock"
"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/config"
bgrpc "github.com/letsencrypt/boulder/grpc"
"github.com/letsencrypt/b... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/ari_test.go | third-party/github.com/letsencrypt/boulder/test/integration/ari_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509/pkix"
"math/big"
"os"
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
// certID matches the ASN.1 structure of the CertID sequence defined by RFC6960.
t... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/issuance_test.go | third-party/github.com/letsencrypt/boulder/test/integration/issuance_test.go | //go:build integration
package integration
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/x509"
"fmt"
"os"
"strings"
"testing"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
// TestCommonNameInCSR ensures that CSRs which have a CN set result in certs
// with the ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/authz_test.go | third-party/github.com/letsencrypt/boulder/test/integration/authz_test.go | //go:build integration
package integration
import (
"testing"
"time"
"github.com/eggsampler/acme/v3"
"github.com/letsencrypt/boulder/test"
)
const (
// validAuthorizationLifetime is the expected valid authorization lifetime. It
// should match the value in the RA config's "authorizationLifetimeDays"
// conf... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/integration/testdata/fermat_csr.go | third-party/github.com/letsencrypt/boulder/test/integration/testdata/fermat_csr.go | package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"log"
"math/big"
"os"
)
const (
// bits is the size of the resulting RSA key, also known as "nlen" or "Length
// of the modulus N". Usually 1024, 2048, or 4096.
bits = 2048
// gap is the exponent of the... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/ct-test-srv/main.go | third-party/github.com/letsencrypt/boulder/test/ct-test-srv/main.go | // This is a test server that implements the subset of RFC6962 APIs needed to
// run Boulder's CT log submission code. Currently it only implements add-chain.
// This is used by startservers.py.
package main
import (
"crypto/ecdsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"i... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/inmem/nonce/nonce.go | third-party/github.com/letsencrypt/boulder/test/inmem/nonce/nonce.go | package inmemnonce
import (
"context"
"github.com/go-jose/go-jose/v4"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"
"github.com/letsencrypt/boulder/nonce"
noncepb "github.com/letsencrypt/boulder/nonce/proto"
)
// Service implements noncepb.NonceServiceClient for tests.
type Service... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/inmem/sa/sa.go | third-party/github.com/letsencrypt/boulder/test/inmem/sa/sa.go | package sa
import (
"context"
"io"
corepb "github.com/letsencrypt/boulder/core/proto"
"github.com/letsencrypt/boulder/sa"
sapb "github.com/letsencrypt/boulder/sa/proto"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"
)
// SA meets the `sapb.StorageAuthorityClient` interface and acts... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/inmem/ra/ra.go | third-party/github.com/letsencrypt/boulder/test/inmem/ra/ra.go | package ra
import (
"context"
"github.com/letsencrypt/boulder/ra"
rapb "github.com/letsencrypt/boulder/ra/proto"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"
)
// RA meets the `rapb.RegistrationAuthorityClient` interface and acts as a
// wrapper for an inner `*ra.RegistrationAuthor... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/s3-test-srv/main.go | third-party/github.com/letsencrypt/boulder/test/s3-test-srv/main.go | package main
import (
"context"
"crypto/x509"
"flag"
"fmt"
"io"
"net/http"
"sync"
"time"
"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/core"
"github.com/letsencrypt/boulder/revocation"
)
type s3TestSrv struct {
sync.RWMutex
allSerials map[string]revocation.Reason
allShards map[s... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/aia-test-srv/main.go | third-party/github.com/letsencrypt/boulder/test/aia-test-srv/main.go | package main
import (
"context"
"flag"
"fmt"
"net/http"
"net/url"
"os"
"path"
"regexp"
"strings"
"time"
"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/issuance"
)
type aiaTestSrv struct {
issuersByName map[string]*issuance.Certificate
}
func (srv *aiaTestSrv) handleIssuer(w http.R... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/boulder-tools/flushredis/main.go | third-party/github.com/letsencrypt/boulder/test/boulder-tools/flushredis/main.go | package main
import (
"context"
"fmt"
"os"
"github.com/letsencrypt/boulder/cmd"
blog "github.com/letsencrypt/boulder/log"
"github.com/letsencrypt/boulder/metrics"
bredis "github.com/letsencrypt/boulder/redis"
"github.com/redis/go-redis/v9"
)
func main() {
rc := bredis.Config{
Username: "unittest-rw",
T... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/health-checker/main.go | third-party/github.com/letsencrypt/boulder/test/health-checker/main.go | package main
import (
"context"
"flag"
"fmt"
"os"
"strings"
"time"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
"github.com/letsencrypt/boulder/cmd"
bgrpc "github.com/letsencrypt/boulder/grpc"
"github.com/letsencrypt/boulder/metrics"
)
type config struct {
GRPC *cmd.GRPCClientConfig
TLS *cmd... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/ocsp/ocsp_forever/main.go | third-party/github.com/letsencrypt/boulder/test/ocsp/ocsp_forever/main.go | package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"path/filepath"
"time"
prom "github.com/prometheus/client_golang/prometheus"
promhttp "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/letsencrypt/boulder/test/ocsp/helper"
)
var listenAddress = flag.String("listen", ":8080", "P... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/ocsp/checkocsp/checkocsp.go | third-party/github.com/letsencrypt/boulder/test/ocsp/checkocsp/checkocsp.go | package main
import (
"encoding/hex"
"flag"
"fmt"
"log"
"math/big"
"os"
"strings"
"github.com/letsencrypt/boulder/test/ocsp/helper"
)
func main() {
flag.Usage = func() {
fmt.Fprintf(os.Stderr, `
checkocsp [OPTION]... FILE [FILE]...
OCSP-checking tool. Provide a list of filenames for certificates in PEM f... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/ocsp/checkari/main.go | third-party/github.com/letsencrypt/boulder/test/ocsp/checkari/main.go | package main
import (
"crypto"
_ "crypto/sha256"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/base64"
"encoding/json"
"flag"
"fmt"
"io"
"math/big"
"net/http"
"os"
"github.com/letsencrypt/boulder/core"
)
// certID matches the ASN.1 structure of the CertID sequence defined by RFC6960.
type ... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/ocsp/helper/helper.go | third-party/github.com/letsencrypt/boulder/test/ocsp/helper/helper.go | package helper
import (
"bytes"
"crypto/x509"
"crypto/x509/pkix"
"encoding/asn1"
"encoding/base64"
"encoding/pem"
"errors"
"flag"
"fmt"
"io"
"math/big"
"net/http"
"net/url"
"os"
"strings"
"sync"
"time"
"golang.org/x/crypto/ocsp"
)
var (
method *string
urlOverride *string
hostO... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/list-features/list-features.go | third-party/github.com/letsencrypt/boulder/test/list-features/list-features.go | package main
import (
"fmt"
"reflect"
"github.com/letsencrypt/boulder/features"
)
func main() {
for _, flag := range reflect.VisibleFields(reflect.TypeOf(features.Config{})) {
fmt.Println(flag.Name)
}
}
| go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
cli/cli | https://github.com/cli/cli/blob/c534a758887878331dda780aeb696b113f37b4ab/third-party/github.com/letsencrypt/boulder/test/certs/webpki.go | third-party/github.com/letsencrypt/boulder/test/certs/webpki.go | // generate.go is a helper utility for integration tests.
package main
import (
"errors"
"fmt"
"os"
"os/exec"
"regexp"
"strings"
"text/template"
"github.com/letsencrypt/boulder/cmd"
blog "github.com/letsencrypt/boulder/log"
)
// createSlot initializes a SoftHSM slot and token. SoftHSM chooses the highest em... | go | MIT | c534a758887878331dda780aeb696b113f37b4ab | 2026-01-07T08:35:47.579368Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.