Documentation ¶
Overview ¶
Security (experimental)
Index ¶
- type CertificateErrorAction
- type CertificateErrorEvent
- type CertificateId
- type Client
- func (d *Client) Disable() *DisableRequest
- func (d *Client) Enable() *EnableRequest
- func (d *Client) HandleCertificateError() *HandleCertificateErrorRequest
- func (d *Client) SetOverrideCertificateErrors() *SetOverrideCertificateErrorsRequest
- func (d *Client) ShowCertificateViewer() *ShowCertificateViewerRequest
- type DisableRequest
- type EnableRequest
- type HandleCertificateErrorRequest
- type InsecureContentStatus
- type SecurityState
- type SecurityStateChangedEvent
- type SecurityStateExplanation
- type SetOverrideCertificateErrorsRequest
- type ShowCertificateViewerRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateErrorAction ¶
type CertificateErrorAction string
type CertificateErrorEvent ¶
type CertificateErrorEvent struct { // The ID of the event. EventId int `json:"eventId"` // The type of the error. ErrorType string `json:"errorType"` // The url that was requested. RequestURL string `json:"requestURL"` }
There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the handleCertificateError command. Note: this event does not fire if the certificate error has been allowed internally.
type CertificateId ¶
type CertificateId int
type Client ¶
Security (experimental)
func (*Client) Disable ¶
func (d *Client) Disable() *DisableRequest
Disables tracking security state changes.
func (*Client) Enable ¶
func (d *Client) Enable() *EnableRequest
Enables tracking security state changes.
func (*Client) HandleCertificateError ¶
func (d *Client) HandleCertificateError() *HandleCertificateErrorRequest
Handles a certificate error that fired a certificateError event.
func (*Client) SetOverrideCertificateErrors ¶
func (d *Client) SetOverrideCertificateErrors() *SetOverrideCertificateErrorsRequest
Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with handleCertificateError commands.
func (*Client) ShowCertificateViewer ¶
func (d *Client) ShowCertificateViewer() *ShowCertificateViewerRequest
Displays native dialog with the certificate details.
type DisableRequest ¶
type DisableRequest struct {
// contains filtered or unexported fields
}
func (*DisableRequest) Do ¶
func (r *DisableRequest) Do() error
type EnableRequest ¶
type EnableRequest struct {
// contains filtered or unexported fields
}
func (*EnableRequest) Do ¶
func (r *EnableRequest) Do() error
type HandleCertificateErrorRequest ¶
type HandleCertificateErrorRequest struct {
// contains filtered or unexported fields
}
func (*HandleCertificateErrorRequest) Action ¶
func (r *HandleCertificateErrorRequest) Action(v CertificateErrorAction) *HandleCertificateErrorRequest
The action to take on the certificate error.
func (*HandleCertificateErrorRequest) Do ¶
func (r *HandleCertificateErrorRequest) Do() error
func (*HandleCertificateErrorRequest) EventId ¶
func (r *HandleCertificateErrorRequest) EventId(v int) *HandleCertificateErrorRequest
The ID of the event.
type InsecureContentStatus ¶
type InsecureContentStatus struct { // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. RanMixedContent bool `json:"ranMixedContent"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. DisplayedMixedContent bool `json:"displayedMixedContent"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url. ContainedMixedForm bool `json:"containedMixedForm"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. RanContentWithCertErrors bool `json:"ranContentWithCertErrors"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors. DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors"` // Security state representing a page that ran insecure content. RanInsecureContentStyle SecurityState `json:"ranInsecureContentStyle"` // Security state representing a page that displayed insecure content. DisplayedInsecureContentStyle SecurityState `json:"displayedInsecureContentStyle"` }
type SecurityState ¶
type SecurityState string
type SecurityStateChangedEvent ¶
type SecurityStateChangedEvent struct { // Security state. SecurityState SecurityState `json:"securityState"` // True if the page was loaded over cryptographic transport such as HTTPS. SchemeIsCryptographic bool `json:"schemeIsCryptographic"` // List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included. Explanations []*SecurityStateExplanation `json:"explanations"` // Information about insecure content on the page. InsecureContentStatus *InsecureContentStatus `json:"insecureContentStatus"` // Overrides user-visible description of the state. (optional) Summary string `json:"summary"` }
The security state of the page changed.
type SecurityStateExplanation ¶
type SecurityStateExplanation struct { // Security state representing the severity of the factor being explained. SecurityState SecurityState `json:"securityState"` // Short phrase describing the type of factor. Summary string `json:"summary"` // Full text explanation of the factor. Description string `json:"description"` // True if the page has a certificate. HasCertificate bool `json:"hasCertificate"` }
type SetOverrideCertificateErrorsRequest ¶
type SetOverrideCertificateErrorsRequest struct {
// contains filtered or unexported fields
}
func (*SetOverrideCertificateErrorsRequest) Do ¶
func (r *SetOverrideCertificateErrorsRequest) Do() error
func (*SetOverrideCertificateErrorsRequest) Override ¶
func (r *SetOverrideCertificateErrorsRequest) Override(v bool) *SetOverrideCertificateErrorsRequest
If true, certificate errors will be overridden.
type ShowCertificateViewerRequest ¶
type ShowCertificateViewerRequest struct {
// contains filtered or unexported fields
}
func (*ShowCertificateViewerRequest) Do ¶
func (r *ShowCertificateViewerRequest) Do() error