Module: Dkim::Options

Included in:
Dkim, SignedMail
Defined in:
lib/dkim/options.rb

Instance Attribute Summary (collapse)

Instance Attribute Details

- (String) body_canonicalization

Body canonicalization algorithm. Valid values are 'simple' and 'relaxed' (default) This corresponds to the second half of the c= tag in the dkim header.

Returns:

  • (String)

    body canonicalization algorithm



60
# File 'lib/dkim/options.rb', line 60

define_option_method :body_canonicalization

- (String) domain

The domain used for signing. This corresponds to the d= tag in the dkim header.

Returns:

  • (String)

    domain



40
# File 'lib/dkim/options.rb', line 40

define_option_method :domain

- (String) header_canonicalization

Header canonicalization algorithm. Valid values are 'simple' and 'relaxed' (default) This corresponds to the first half of the c= tag in the dkim header.

Returns:

  • (String)

    header canonicalization algorithm



53
# File 'lib/dkim/options.rb', line 53

define_option_method :header_canonicalization

- (Object) options



13
14
15
# File 'lib/dkim/options.rb', line 13

def options
  @options ||= {}
end

- (OpenSSL::PKey::RSA) private_key

RSA private key for signing. Can be assigned either an OpenSSL::PKey::RSA private key or a valid PEM format string.

Returns:

  • (OpenSSL::PKey::RSA)

    private key



66
# File 'lib/dkim/options.rb', line 66

define_option_method :private_key

- (String) selector

Selector used for signing. This corresponds to the s= tag in the dkim header.

Returns:

  • (String)

    selector



46
# File 'lib/dkim/options.rb', line 46

define_option_method :selector

- (Array<String>) signable_headers

Configures which headers should be signed. Defaults to Dkim::DefaultHeaders

Returns:

  • (Array<String>)

    signable headers



34
# File 'lib/dkim/options.rb', line 34

define_option_method :signable_headers

- (String) signing_algorithm

The signing algorithm for dkim. Valid values are 'rsa-sha1' and 'rsa-sha256' (default). This corresponds to the a= tag in the dkim header.

Returns:

  • (String)

    signing algorithm



28
# File 'lib/dkim/options.rb', line 28

define_option_method :signing_algorithm

- (Time, #to_i) time

This corresponds to the t= tag in the dkim header. The default (nil) is to use the current time at signing.

Returns:

  • (Time, #to_i)

    A Time object or seconds since the epoch



22
# File 'lib/dkim/options.rb', line 22

define_option_method :time