Documentation
¶
Index ¶
- Constants
- type AmqpRPCCLient
- func (rpc *AmqpRPCCLient) Dispatch(method string, body []byte) chan []byte
- func (rpc *AmqpRPCCLient) DispatchSync(method string, body []byte) (response []byte, err error)
- func (rpc *AmqpRPCCLient) SetTimeout(ttl time.Duration)
- func (rpc *AmqpRPCCLient) SyncDispatchWithTimeout(method string, body []byte, ttl time.Duration) (response []byte, err error)
- type AmqpRPCServer
- func NewAmqpRPCServer(serverQueue string, channel *amqp.Channel) *AmqpRPCServer
- func NewCertificateAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.CertificateAuthority) (rpc *AmqpRPCServer, err error)
- func NewRegistrationAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.RegistrationAuthority) (*AmqpRPCServer, error)
- func NewStorageAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.StorageAuthority) *AmqpRPCServer
- func NewValidationAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.ValidationAuthority) (rpc *AmqpRPCServer, err error)
- type CertificateAuthorityClient
- type RegistrationAuthorityClient
- func (rac RegistrationAuthorityClient) NewAuthorization(authz core.Authorization, regID int64) (newAuthz core.Authorization, err error)
- func (rac RegistrationAuthorityClient) NewCertificate(cr core.CertificateRequest, regID int64) (cert core.Certificate, err error)
- func (rac RegistrationAuthorityClient) NewRegistration(reg core.Registration, key jose.JsonWebKey) (newReg core.Registration, err error)
- func (rac RegistrationAuthorityClient) OnValidationUpdate(authz core.Authorization) (err error)
- func (rac RegistrationAuthorityClient) RevokeCertificate(cert x509.Certificate) (err error)
- func (rac RegistrationAuthorityClient) UpdateAuthorization(authz core.Authorization, index int, response core.Challenge) (newAuthz core.Authorization, err error)
- func (rac RegistrationAuthorityClient) UpdateRegistration(base core.Registration, update core.Registration) (newReg core.Registration, err error)
- type StorageAuthorityClient
- func (cac StorageAuthorityClient) AddCertificate(cert []byte, regID int64) (id string, err error)
- func (cac StorageAuthorityClient) AddDeniedCSR(names []string) (err error)
- func (cac StorageAuthorityClient) AlreadyDeniedCSR(names []string) (exists bool, err error)
- func (cac StorageAuthorityClient) FinalizeAuthorization(authz core.Authorization) (err error)
- func (cac StorageAuthorityClient) GetAuthorization(id string) (authz core.Authorization, err error)
- func (cac StorageAuthorityClient) GetCertificate(id string) (cert []byte, err error)
- func (cac StorageAuthorityClient) GetCertificateByShortSerial(id string) (cert []byte, err error)
- func (cac StorageAuthorityClient) GetCertificateStatus(id string) (status core.CertificateStatus, err error)
- func (cac StorageAuthorityClient) GetRegistration(id int64) (reg core.Registration, err error)
- func (cac StorageAuthorityClient) GetRegistrationByKey(key jose.JsonWebKey) (reg core.Registration, err error)
- func (cac StorageAuthorityClient) MarkCertificateRevoked(serial string, ocspResponse []byte, reasonCode int) (err error)
- func (cac StorageAuthorityClient) NewPendingAuthorization() (id string, err error)
- func (cac StorageAuthorityClient) NewRegistration(reg core.Registration) (output core.Registration, err error)
- func (cac StorageAuthorityClient) UpdatePendingAuthorization(authz core.Authorization) (err error)
- func (cac StorageAuthorityClient) UpdateRegistration(reg core.Registration) (err error)
- type ValidationAuthorityClient
Constants ¶
const ( AmqpExchange = "boulder" AmqpExchangeType = "topic" AmqpInternal = false AmqpDurable = false AmqpDeleteUnused = false AmqpExclusive = false AmqpNoWait = false AmqpNoLocal = false AmqpAutoAck = true AmqpMandatory = false AmqpImmediate = false )
XXX: I *think* these constants are appropriate. We will probably want to tweak these in the future.
const ( MethodNewRegistration = "NewRegistration" // RA, SA MethodNewAuthorization = "NewAuthorization" // RA MethodNewCertificate = "NewCertificate" // RA MethodUpdateRegistration = "UpdateRegistration" // RA, SA MethodUpdateAuthorization = "UpdateAuthorization" // RA MethodRevokeCertificate = "RevokeCertificate" // RA MethodOnValidationUpdate = "OnValidationUpdate" // RA MethodUpdateValidations = "UpdateValidations" // VA MethodIssueCertificate = "IssueCertificate" // CA MethodRevokeCertificateCA = "RevokeCertificateCA" // CA MethodGetRegistration = "GetRegistration" // SA MethodGetRegistrationByKey = "GetRegistrationByKey" // RA, SA MethodGetAuthorization = "GetAuthorization" // SA MethodGetCertificate = "GetCertificate" // SA MethodGetCertificateByShortSerial = "GetCertificateByShortSerial" // SA MethodGetCertificateStatus = "GetCertificateStatus" // SA MethodMarkCertificateRevoked = "MarkCertificateRevoked" // SA MethodNewPendingAuthorization = "NewPendingAuthorization" // SA MethodUpdatePendingAuthorization = "UpdatePendingAuthorization" // SA MethodFinalizeAuthorization = "FinalizeAuthorization" // SA MethodAddCertificate = "AddCertificate" // SA MethodAddDeniedCSR = "AddDeniedCSR" // SA MethodAlreadyDeniedCSR = "AlreadyDeniedCSR" // SA )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmqpRPCCLient ¶
type AmqpRPCCLient struct {
// contains filtered or unexported fields
}
An AMQP-RPC client sends requests to a specific server queue, and uses a dedicated response queue for responses.
To implement specific functionality, using code uses the Dispatch() method to send a method name and body, and get back a response. So you end up with wrapper methods of the form:
```
request = /* serialize request to []byte */ response = <-AmqpRPCCLient.Dispatch(method, request) return /* deserialized response */
```
Callers that don't care about the response can just call Dispatch() and ignore the return value.
DispatchSync will manage the channel for you, and also enforce a timeout on the transaction (default 60 seconds)
func NewAmqpRPCCLient ¶
func NewAmqpRPCCLient(clientQueue, serverQueue string, channel *amqp.Channel) (rpc *AmqpRPCCLient, err error)
func (*AmqpRPCCLient) Dispatch ¶
func (rpc *AmqpRPCCLient) Dispatch(method string, body []byte) chan []byte
func (*AmqpRPCCLient) DispatchSync ¶
func (rpc *AmqpRPCCLient) DispatchSync(method string, body []byte) (response []byte, err error)
func (*AmqpRPCCLient) SetTimeout ¶
func (rpc *AmqpRPCCLient) SetTimeout(ttl time.Duration)
func (*AmqpRPCCLient) SyncDispatchWithTimeout ¶
type AmqpRPCServer ¶
type AmqpRPCServer struct {
// contains filtered or unexported fields
}
An AMQP-RPC Server listens on a specified queue within an AMQP channel. When messages arrive on that queue, it dispatches them based on type, and returns the response to the ReplyTo queue.
To implement specific functionality, using code should use the Handle method to add specific actions.
func NewAmqpRPCServer ¶
func NewAmqpRPCServer(serverQueue string, channel *amqp.Channel) *AmqpRPCServer
Create a new AMQP-RPC server on the given queue and channel. Note that you must call Start() to actually start the server listening for requests.
func NewCertificateAuthorityServer ¶
func NewCertificateAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.CertificateAuthority) (rpc *AmqpRPCServer, err error)
CertificateAuthorityClient / Server
-> IssueCertificate
func NewRegistrationAuthorityServer ¶
func NewRegistrationAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.RegistrationAuthority) (*AmqpRPCServer, error)
func NewStorageAuthorityServer ¶
func NewStorageAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.StorageAuthority) *AmqpRPCServer
func NewValidationAuthorityServer ¶
func NewValidationAuthorityServer(serverQueue string, channel *amqp.Channel, impl core.ValidationAuthority) (rpc *AmqpRPCServer, err error)
ValidationAuthorityClient / Server
-> UpdateValidations
func (*AmqpRPCServer) Handle ¶
func (rpc *AmqpRPCServer) Handle(method string, handler func([]byte) []byte)
func (*AmqpRPCServer) Start ¶
func (rpc *AmqpRPCServer) Start() (err error)
Starts the AMQP-RPC server running in a separate thread. There is currently no Stop() method.
type CertificateAuthorityClient ¶
type CertificateAuthorityClient struct {
// contains filtered or unexported fields
}
func NewCertificateAuthorityClient ¶
func NewCertificateAuthorityClient(clientQueue, serverQueue string, channel *amqp.Channel) (cac CertificateAuthorityClient, err error)
func (CertificateAuthorityClient) IssueCertificate ¶
func (cac CertificateAuthorityClient) IssueCertificate(csr x509.CertificateRequest, regID int64) (cert core.Certificate, err error)
func (CertificateAuthorityClient) RevokeCertificate ¶
func (cac CertificateAuthorityClient) RevokeCertificate(serial string) (err error)
type RegistrationAuthorityClient ¶
type RegistrationAuthorityClient struct {
// contains filtered or unexported fields
}
func NewRegistrationAuthorityClient ¶
func NewRegistrationAuthorityClient(clientQueue, serverQueue string, channel *amqp.Channel) (rac RegistrationAuthorityClient, err error)
func (RegistrationAuthorityClient) NewAuthorization ¶
func (rac RegistrationAuthorityClient) NewAuthorization(authz core.Authorization, regID int64) (newAuthz core.Authorization, err error)
func (RegistrationAuthorityClient) NewCertificate ¶
func (rac RegistrationAuthorityClient) NewCertificate(cr core.CertificateRequest, regID int64) (cert core.Certificate, err error)
func (RegistrationAuthorityClient) NewRegistration ¶
func (rac RegistrationAuthorityClient) NewRegistration(reg core.Registration, key jose.JsonWebKey) (newReg core.Registration, err error)
func (RegistrationAuthorityClient) OnValidationUpdate ¶
func (rac RegistrationAuthorityClient) OnValidationUpdate(authz core.Authorization) (err error)
func (RegistrationAuthorityClient) RevokeCertificate ¶
func (rac RegistrationAuthorityClient) RevokeCertificate(cert x509.Certificate) (err error)
func (RegistrationAuthorityClient) UpdateAuthorization ¶
func (rac RegistrationAuthorityClient) UpdateAuthorization(authz core.Authorization, index int, response core.Challenge) (newAuthz core.Authorization, err error)
func (RegistrationAuthorityClient) UpdateRegistration ¶
func (rac RegistrationAuthorityClient) UpdateRegistration(base core.Registration, update core.Registration) (newReg core.Registration, err error)
type StorageAuthorityClient ¶
type StorageAuthorityClient struct {
// contains filtered or unexported fields
}
func NewStorageAuthorityClient ¶
func NewStorageAuthorityClient(clientQueue, serverQueue string, channel *amqp.Channel) (sac StorageAuthorityClient, err error)
func (StorageAuthorityClient) AddCertificate ¶
func (cac StorageAuthorityClient) AddCertificate(cert []byte, regID int64) (id string, err error)
func (StorageAuthorityClient) AddDeniedCSR ¶
func (cac StorageAuthorityClient) AddDeniedCSR(names []string) (err error)
func (StorageAuthorityClient) AlreadyDeniedCSR ¶
func (cac StorageAuthorityClient) AlreadyDeniedCSR(names []string) (exists bool, err error)
func (StorageAuthorityClient) FinalizeAuthorization ¶
func (cac StorageAuthorityClient) FinalizeAuthorization(authz core.Authorization) (err error)
func (StorageAuthorityClient) GetAuthorization ¶
func (cac StorageAuthorityClient) GetAuthorization(id string) (authz core.Authorization, err error)
func (StorageAuthorityClient) GetCertificate ¶
func (cac StorageAuthorityClient) GetCertificate(id string) (cert []byte, err error)
func (StorageAuthorityClient) GetCertificateByShortSerial ¶
func (cac StorageAuthorityClient) GetCertificateByShortSerial(id string) (cert []byte, err error)
func (StorageAuthorityClient) GetCertificateStatus ¶
func (cac StorageAuthorityClient) GetCertificateStatus(id string) (status core.CertificateStatus, err error)
func (StorageAuthorityClient) GetRegistration ¶
func (cac StorageAuthorityClient) GetRegistration(id int64) (reg core.Registration, err error)
func (StorageAuthorityClient) GetRegistrationByKey ¶
func (cac StorageAuthorityClient) GetRegistrationByKey(key jose.JsonWebKey) (reg core.Registration, err error)
func (StorageAuthorityClient) MarkCertificateRevoked ¶
func (cac StorageAuthorityClient) MarkCertificateRevoked(serial string, ocspResponse []byte, reasonCode int) (err error)
func (StorageAuthorityClient) NewPendingAuthorization ¶
func (cac StorageAuthorityClient) NewPendingAuthorization() (id string, err error)
func (StorageAuthorityClient) NewRegistration ¶
func (cac StorageAuthorityClient) NewRegistration(reg core.Registration) (output core.Registration, err error)
func (StorageAuthorityClient) UpdatePendingAuthorization ¶
func (cac StorageAuthorityClient) UpdatePendingAuthorization(authz core.Authorization) (err error)
func (StorageAuthorityClient) UpdateRegistration ¶
func (cac StorageAuthorityClient) UpdateRegistration(reg core.Registration) (err error)
type ValidationAuthorityClient ¶
type ValidationAuthorityClient struct {
// contains filtered or unexported fields
}
func NewValidationAuthorityClient ¶
func NewValidationAuthorityClient(clientQueue, serverQueue string, channel *amqp.Channel) (vac ValidationAuthorityClient, err error)
func (ValidationAuthorityClient) UpdateValidations ¶
func (vac ValidationAuthorityClient) UpdateValidations(authz core.Authorization) error