add possibility for custom attribute methods

it enables the use of higher level types such as OpenSSL::PKey::RSA
instead of the plaintext key in pem format