Module: Dkim::Options

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

Instance Attribute Summary collapse

Instance Attribute Details

#body_canonicalizationString

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



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

define_option_method :body_canonicalization

#domainString

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

Returns:

  • (String)

    domain



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

define_option_method :domain

#expireTime, #to_i

Signature expiration. This corresponds to the x= tag in the dkim header.

Returns:

  • (Time, #to_i)

    A Time object or seconds since the epoch



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

define_option_method :expire

#header_canonicalizationString

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



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

define_option_method :header_canonicalization

#identityString

The identity used for signing. This corresponds to the i= tag in the dkim header.

Returns:

  • (String)

    identity



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

define_option_method :identity

#optionsObject



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

def options
  @options ||= {}
end

#private_keyOpenSSL::PKey::RSA

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



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

define_option_method :private_key

#selectorString

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

Returns:

  • (String)

    selector



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

define_option_method :selector

#signable_headersArray<String>

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

Returns:

  • (Array<String>)

    signable headers



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

define_option_method :signable_headers

#signing_algorithmString

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



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

define_option_method :signing_algorithm

#timeTime, #to_i

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