End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::PKey::DSA#export
dsa.export([cipher, password]) → aString
ext/openssl/ossl_pkey_dsa.c
View on GitHub ↗
static VALUE
ossl_dsa_export(int argc, VALUE *argv, VALUE self)
{
OSSL_3_const DSA *dsa;
GetDSA(self, dsa);
if (DSA_HAS_PRIVATE(dsa))
return ossl_pkey_export_traditional(argc, argv, self, 0);
else
return ossl_pkey_export_spki(self, 0);
}
Encodes this DSA to its PEM encoding.
Parameters
-
cipher is an
OpenSSL::Cipher. -
password is a string containing your password.
Examples
DSA.to_pem -> aString DSA.to_pem(cipher, 'mypassword') -> aString