End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::PKey::DSA#to_der
dsa.to_der → aString
ext/openssl/ossl_pkey_dsa.c
View on GitHub ↗
static VALUE
ossl_dsa_to_der(VALUE self)
{
DSA *dsa;
GetDSA(self, dsa);
if (DSA_HAS_PRIVATE(dsa))
return ossl_pkey_export_traditional(0, NULL, self, 1);
else
return ossl_pkey_export_spki(self, 1);
}
Encodes this DSA to its DER encoding.