_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c31200
train
// Fail exits and prints an error message to stderr and the logger audit log.
{ "resource": "" }
c31201
train
// FailOnError exits and prints an error message, but only if we encountered // a problem and err != nil
{ "resource": "" }
c31202
train
// LoadCert loads a PEM-formatted certificate from the provided path, returning // it as a byte array, or an error if it couldn't be decoded.
{ "resource": "" }
c31203
train
// ReadConfigFile takes a file path as an argument and attempts to // unmarshal the content of the file into a struct containing a // configuration of a boulder component.
{ "resource": "" }
c31204
train
// VersionString produces a friendly Application version string.
{ "resource": "" }
c31205
train
// CatchSignals catches SIGTERM, SIGINT, SIGHUP and executes a callback // method before exiting
{ "resource": "" }
c31206
train
// saveCheckpoint atomically writes the provided ID to the provided file. The // method os.Rename makes use of the renameat syscall to atomically replace // one file with another. It creates a temporary file in a temporary directory // before using os.Rename to replace the old file with the new one.
{ "resource": "" }
c31207
train
// getWork selects a set of authorizations that expired before purgeBefore, bounded by batchSize, // that have IDs that are more than initialID from either the pendingAuthorizations or authz tables // and adds them to the work channel. It returns the last ID it selected and the number of IDs it // added to the work cha...
{ "resource": "" }
c31208
train
// deleteAuthorizations reads from the work channel and deletes each authorization // from either the pendingAuthorization or authz tables. If maxDPS is more than 0 // it will throttle the number of DELETE statements it generates to the passed rate.
{ "resource": "" }
c31209
train
// Write writes the body and sets the status code to 200 if a status code // has not already been set.
{ "resource": "" }
c31210
train
// Is returns true if err is non-nil and is either context.Canceled, or has a // grpc code of Canceled. This is useful because cancelations propagate through // gRPC boundaries, and if we choose to treat in-process cancellations a certain // way, we usually want to treat cross-process cancellations the same way.
{ "resource": "" }
c31211
train
// NewRegistrationAuthorityImpl constructs a new RA object.
{ "resource": "" }
c31212
train
// checkRegistrationIPLimit checks a specific registraton limit by using the // provided registrationCounter function to determine if the limit has been // exceeded for a given IP or IP range
{ "resource": "" }
c31213
train
// checkRegistrationLimits enforces the RegistrationsPerIP and // RegistrationsPerIPRange limits
{ "resource": "" }
c31214
train
// NewRegistration constructs a new Registration from a request.
{ "resource": "" }
c31215
train
// validateEmail returns an error if the given address is not parseable as an // email address or if the domain portion of the email address is a member of // the forbiddenMailDomains map.
{ "resource": "" }
c31216
train
// checkNewOrdersPerAccountLimit enforces the rlPolicies `NewOrdersPerAccount` // rate limit. This rate limit ensures a client can not create more than the // specified threshold of new orders within the specified time window.
{ "resource": "" }
c31217
train
// checkOrderAuthorizations verifies that a provided set of names associated // with a specific order and account has all of the required valid, unexpired // authorizations to proceed with issuance. It is the ACME v2 equivalent of // `checkAuthorizations`. It returns the authorizations that satisfied the set // of name...
{ "resource": "" }
c31218
train
// checkAuthorizations checks that each requested name has a valid authorization // that won't expire before the certificate expires. It returns the // authorizations that satisifed the set of names or it returns an error. // If it returns an error, it will be of type BoulderError.
{ "resource": "" }
c31219
train
// checkAuthorizationsCAA implements the common logic of validating a set of // authorizations against a set of names that is used by both // `checkAuthorizations` and `checkOrderAuthorizations`. If required CAA will be // rechecked for authorizations that are too old. // If it returns an error, it will be of type Boul...
{ "resource": "" }
c31220
train
// recheckCAA accepts a list of of names that need to have their CAA records // rechecked because their associated authorizations are sufficiently old and // performs the CAA checks required for each. If any of the rechecks fail an // error is returned.
{ "resource": "" }
c31221
train
// failOrder marks an order as failed by setting the problem details field of // the order & persisting it through the SA. If an error occurs doing this we // log it and return the order as-is. There aren't any alternatives if we can't // add the error to the order.
{ "resource": "" }
c31222
train
// FinalizeOrder accepts a request to finalize an order object and, if possible, // issues a certificate to satisfy the order. If an order does not have valid, // unexpired authorizations for all of its associated names an error is // returned. Similarly we vet that all of the names in the order are acceptable // based...
{ "resource": "" }
c31223
train
// NewCertificate requests the issuance of a certificate.
{ "resource": "" }
c31224
train
// issueCertificate sets up a log event structure and captures any errors // encountered during issuance, then calls issueCertificateInner.
{ "resource": "" }
c31225
train
// domainsForRateLimiting transforms a list of FQDNs into a list of eTLD+1's // for the purpose of rate limiting. It also de-duplicates the output // domains. Exact public suffix matches are not included.
{ "resource": "" }
c31226
train
// suffixesForRateLimiting returns the unique subset of input names that are // exactly equal to a public suffix.
{ "resource": "" }
c31227
train
// enforceNameCounts uses the provided count RPC to find a count of certificates // for each of the names. If the count for any of the names exceeds the limit // for the given registration then the names out of policy are returned to be // used for a rate limit error.
{ "resource": "" }
c31228
train
// UpdateRegistration updates an existing Registration with new values. Caller // is responsible for making sure that update.Key is only different from base.Key // if it is being called from the WFE key change endpoint.
{ "resource": "" }
c31229
train
// MergeUpdate copies a subset of information from the input Registration // into the Registration r. It returns true if an update was performed and the base object // was changed, and false if no change was made.
{ "resource": "" }
c31230
train
// revokeCertificate generates a revoked OCSP response for the given certificate, stores // the revocation information, and purges OCSP request URLs from Akamai.
{ "resource": "" }
c31231
train
// RevokeCertificateWithReg terminates trust in the certificate provided.
{ "resource": "" }
c31232
train
// onValidationUpdate saves a validation's new status after receiving an // authorization back from the VA.
{ "resource": "" }
c31233
train
// DeactivateRegistration deactivates a valid registration
{ "resource": "" }
c31234
train
// DeactivateAuthorization deactivates a currently valid authorization
{ "resource": "" }
c31235
train
// createPendingAuthz checks that a name is allowed for issuance and creates the // necessary challenges for it and puts this and all of the relevant information // into a corepb.Authorization for transmission to the SA to be stored
{ "resource": "" }
c31236
train
// authzValidChallengeEnabled checks whether the valid challenge in an authorization uses a type // which is still enabled for given regID
{ "resource": "" }
c31237
train
// wildcardOverlap takes a slice of domain names and returns an error if any of // them is a non-wildcard FQDN that overlaps with a wildcard domain in the map.
{ "resource": "" }
c31238
train
// NewSourceFromDatabase produces a DBSource representing the binding of a // given DB schema to a CA key.
{ "resource": "" }
c31239
train
// Response is called by the HTTP server to handle a new OCSP request.
{ "resource": "" }
c31240
train
// Timeout returns true if the underlying error was a timeout
{ "resource": "" }
c31241
train
// Set accepts a list of features and whether they should // be enabled or disabled, it will return a error if passed // a feature name that it doesn't know
{ "resource": "" }
c31242
train
// Enabled returns true if the feature is enabled or false // if it isn't, it will panic if passed a feature that it // doesn't know.
{ "resource": "" }
c31243
train
// Reset resets the features to their initial state
{ "resource": "" }
c31244
train
// NewDbMap creates the root gorp mapping object. Create one of these for each // database schema you wish to map. Each DbMap contains a list of mapped // tables. It automatically maps the tables for the primary parts of Boulder // around the Storage Authority.
{ "resource": "" }
c31245
train
// adjustMySQLConfig sets certain flags that we want on every connection.
{ "resource": "" }
c31246
train
// SetSQLDebug enables GORP SQL-level Debugging
{ "resource": "" }
c31247
train
// Printf adapts the AuditLogger to GORP's interface
{ "resource": "" }
c31248
train
// LookupTXT is a mock
{ "resource": "" }
c31249
train
// LookupCAA returns mock records for use in tests.
{ "resource": "" }
c31250
train
// ToDb converts a Boulder object to one suitable for the DB representation.
{ "resource": "" }
c31251
train
// NewPromScope returns a Scope that sends data to Prometheus
{ "resource": "" }
c31252
train
// NewScope generates a new Scope prefixed by this Scope's prefix plus the // prefixes given joined by periods
{ "resource": "" }
c31253
train
// Inc increments the given stat and adds the Scope's prefix to the name
{ "resource": "" }
c31254
train
// GaugeDelta sends the change in a gauge stat and adds the Scope's prefix to the name
{ "resource": "" }
c31255
train
// Timing sends a latency stat and adds the Scope's prefix to the name
{ "resource": "" }
c31256
train
// TimingDuration sends a latency stat as a time.Duration and adds the Scope's // prefix to the name
{ "resource": "" }
c31257
train
// SetInt sets a stat's integer value and adds the Scope's prefix to the name
{ "resource": "" }
c31258
train
// statName construct a name for a stat based on the prefix of this scope, plus // the provided string.
{ "resource": "" }
c31259
train
// NewCachePurgeClient constructs a new CachePurgeClient
{ "resource": "" }
c31260
train
// signingKey makes a signing key by HMAC'ing the timestamp // using a client secret as the key.
{ "resource": "" }
c31261
train
// purge actually sends the individual requests to the Akamai endpoint and checks // if they are successful
{ "resource": "" }
c31262
train
// Purge attempts to send a purge request to the Akamai CCU API cpc.retries number // of times before giving up and returning ErrAllRetriesFailed
{ "resource": "" }
c31263
train
// CheckSignature is used for tests, it exported so that it can be used in akamai-test-srv
{ "resource": "" }
c31264
train
// Find all registration IDs with unexpired certificates.
{ "resource": "" }
c31265
train
// The `writeIDs` function produces a file containing JSON serialized // contact objects
{ "resource": "" }
c31266
train
// ClientHandshake does the authentication handshake specified by the corresponding // authentication protocol on rawConn for clients. It returns the authenticated // connection and the corresponding auth information about the connection. // Implementations must use the provided context to implement timely cancellation...
{ "resource": "" }
c31267
train
// ServerHandshake is not implemented for a `clientTransportCredentials`, use // a `serverTransportCredentials` if you require `ServerHandshake`.
{ "resource": "" }
c31268
train
// Clone returns a copy of the clientTransportCredentials
{ "resource": "" }
c31269
train
// ServerHandshake does the authentication handshake for servers. It returns // the authenticated connection and the corresponding auth information about // the connection.
{ "resource": "" }
c31270
train
// ClientHandshake is not implemented for a `serverTransportCredentials`, use // a `clientTransportCredentials` if you require `ClientHandshake`.
{ "resource": "" }
c31271
train
// GetRequestMetadata returns nil, nil since TLS credentials do not have metadata.
{ "resource": "" }
c31272
train
// Clone returns a copy of the serverTransportCredentials
{ "resource": "" }
c31273
train
// ValidChallenge tests whether the provided string names a known challenge
{ "resource": "" }
c31274
train
// UnmarshalJSON provides an implementation for decoding CertificateRequest objects.
{ "resource": "" }
c31275
train
// MarshalJSON provides an implementation for encoding CertificateRequest objects.
{ "resource": "" }
c31276
train
// ExpectedKeyAuthorization computes the expected KeyAuthorization value for // the challenge.
{ "resource": "" }
c31277
train
// RecordsSane checks the sanity of a ValidationRecord object before sending it // back to the RA to be stored.
{ "resource": "" }
c31278
train
// CheckConsistencyForClientOffer checks the fields of a challenge object before it is // given to the client.
{ "resource": "" }
c31279
train
// CheckConsistencyForValidation checks the fields of a challenge object before it is // given to the VA.
{ "resource": "" }
c31280
train
// checkConsistency checks the sanity of a challenge object before issued to the client.
{ "resource": "" }
c31281
train
// StringID is used to generate a ID for challenges associated with new style authorizations. // This is necessary as these challenges no longer have a unique non-sequential identifier // in the new storage scheme. This identifier is generated by constructing a fnv hash over the // challenge token and type and encoding...
{ "resource": "" }
c31282
train
// FindChallenge will look for the given challenge inside this authorization. If // found, it will return the index of that challenge within the Authorization's // Challenges array. Otherwise it will return -1.
{ "resource": "" }
c31283
train
// FindChallengeByStringID will look for a challenge matching the given ID inside // this authorization. If found, it will return the index of that challenge within // the Authorization's Challenges array. Otherwise it will return -1.
{ "resource": "" }
c31284
train
// URL-safe base64 encode that strips padding
{ "resource": "" }
c31285
train
// URL-safe base64 decoder that adds padding
{ "resource": "" }
c31286
train
// MarshalJSON encodes a JSONBuffer for transmission.
{ "resource": "" }
c31287
train
// UnmarshalJSON decodes a JSONBuffer to an object.
{ "resource": "" }
c31288
train
// RelativeEndpoint takes a path component of URL and constructs a new URL using // the host and port from the request combined the provided path.
{ "resource": "" }
c31289
train
// NewMessage creates a new Message. // // chatID is where to send it, text is the message text.
{ "resource": "" }
c31290
train
// NewDeleteMessage creates a request to delete a message.
{ "resource": "" }
c31291
train
// NewMessageToChannel creates a new Message that is sent to a channel // by username. // // username is the username of the channel, text is the message text.
{ "resource": "" }
c31292
train
// NewForward creates a new forward. // // chatID is where to send it, fromChatID is the source chat, // and messageID is the ID of the original message.
{ "resource": "" }
c31293
train
// NewPhotoUpload creates a new photo uploader. // // chatID is where to send it, file is a string path to the file, // FileReader, or FileBytes. // // Note that you must send animated GIFs as a document.
{ "resource": "" }
c31294
train
// NewPhotoShare shares an existing photo. // You may use this to reshare an existing photo without reuploading it. // // chatID is where to send it, fileID is the ID of the file // already uploaded.
{ "resource": "" }
c31295
train
// NewAudioUpload creates a new audio uploader. // // chatID is where to send it, file is a string path to the file, // FileReader, or FileBytes.
{ "resource": "" }
c31296
train
// NewAudioShare shares an existing audio file. // You may use this to reshare an existing audio file without // reuploading it. // // chatID is where to send it, fileID is the ID of the audio // already uploaded.
{ "resource": "" }
c31297
train
// NewDocumentUpload creates a new document uploader. // // chatID is where to send it, file is a string path to the file, // FileReader, or FileBytes.
{ "resource": "" }
c31298
train
// NewDocumentShare shares an existing document. // You may use this to reshare an existing document without // reuploading it. // // chatID is where to send it, fileID is the ID of the document // already uploaded.
{ "resource": "" }
c31299
train
// NewStickerUpload creates a new sticker uploader. // // chatID is where to send it, file is a string path to the file, // FileReader, or FileBytes.
{ "resource": "" }