# File common/lib/symbiosis/domain/dkim.rb, line 126
    def dkim_public_key_b64
      #
      # Ruby 1.8 uses a different output format for the DER encoded public key
      # to both OpenSSL and Ruby1.9+, so we have to construct the correct
      # format ourselves.
      #
      der_key = if RUBY_VERSION =~ /^1\.8/ 
        OpenSSL::ASN1::Sequence.new([
          OpenSSL::ASN1::Sequence.new([
            OpenSSL::ASN1::ObjectId.new("rsaEncryption"),
            OpenSSL::ASN1::Null.new(nil)
          ]),
          OpenSSL::ASN1::BitString.new(self.dkim_public_key.to_der)
        ]).to_der
      else
        self.dkim_public_key.to_der
      end

      Base64::encode64(der_key).gsub("\n","")
    end