inline void dsa_key::print_parameters(bio::bio_ptr bio) const { error::throw_error_if_not(DSAparams_print(bio.raw(), ptr().get()) != 0); }
inline void dsa_key::write_certificate_public_key(bio::bio_ptr bio) const { error::throw_error_if_not(PEM_write_bio_DSA_PUBKEY(bio.raw(), ptr().get()) != 0); }
inline void dsa_key::print(bio::bio_ptr bio, int offset) const { error::throw_error_if_not(DSA_print(bio.raw(), ptr().get(), offset) != 0); }
inline void dsa_key::write_private_key(bio::bio_ptr bio, cipher::cipher_algorithm algorithm, pem_passphrase_callback_type callback, void* callback_arg) const { error::throw_error_if_not(PEM_write_bio_DSAPrivateKey(bio.raw(), ptr().get(), algorithm.raw(), NULL, 0, callback, callback_arg) != 0); }
inline void dsa_key::write_parameters(bio::bio_ptr bio) const { error::throw_error_if_not(PEM_write_bio_DSAparams(bio.raw(), ptr().get()) != 0); }
inline dsa_key dsa_key::from_certificate_public_key(bio::bio_ptr bio, pem_passphrase_callback_type callback, void* callback_arg) { return take_ownership(PEM_read_bio_DSA_PUBKEY(bio.raw(), NULL, callback, callback_arg)); }
inline void dsa_key::write_private_key(bio::bio_ptr bio, cipher::cipher_algorithm algorithm, const void* passphrase, size_t passphrase_len) const { error::throw_error_if_not(PEM_write_bio_DSAPrivateKey(bio.raw(), ptr().get(), algorithm.raw(), static_cast<unsigned char*>(const_cast<void*>(passphrase)), static_cast<int>(passphrase_len), NULL, NULL) != 0); }
inline void utctime::print(bio::bio_ptr bio) const { throw_error_if_not(ASN1_UTCTIME_print(bio.raw(), ptr().get()) != 0); }
inline dsa_key dsa_key::from_parameters(bio::bio_ptr bio, pem_passphrase_callback_type callback, void* callback_arg) { return take_ownership(PEM_read_bio_DSAparams(bio.raw(), NULL, callback, callback_arg)); }
inline void certificate_request::write_certificate_request(bio::bio_ptr bio) const { error::throw_error_if_not(PEM_write_bio_X509_REQ(bio.raw(), ptr().get()) != 0); }
inline void certificate_request::print(bio::bio_ptr bio) const { error::throw_error_if_not(X509_REQ_print(bio.raw(), ptr().get()) != 0); }
inline void certificate_request::write_der(bio::bio_ptr bio) const { error::throw_error_if_not(i2d_X509_REQ_bio(bio.raw(), ptr().get()) != 0); }
inline certificate_request certificate_request::from_certificate_request(bio::bio_ptr bio, pem_passphrase_callback_type callback, void* callback_arg) { return take_ownership(PEM_read_bio_X509_REQ(bio.raw(), NULL, callback, callback_arg)); }
inline certificate_request certificate_request::from_der(bio::bio_ptr bio) { return take_ownership(d2i_X509_REQ_bio(bio.raw(), NULL)); }
inline void rsa_key::write_public_key(bio::bio_ptr bio) const { error::throw_error_if_not(PEM_write_bio_RSAPublicKey(bio.raw(), ptr().get()) != 0); }
inline rsa_key rsa_key::from_public_key(bio::bio_ptr bio, pem_passphrase_callback_type callback, void* callback_arg) { return take_ownership(PEM_read_bio_RSAPublicKey(bio.raw(), NULL, callback, callback_arg)); }