Ruby: ext/openssl/ossl_pkey_dsa.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Functions | Variables
ossl_pkey_dsa.c File Reference
`#include "ossl.h"`

Go to the source code of this file.

## Data Structures
struct | dsa_blocking_gen_arg

## Macros
#define | GetPKeyDSA(obj, pkey)
#define | GetDSA(obj, dsa)
#define | PEM_read_bio_DSAPublicKey(bp, x, cb, u)
#define | DSAPublicKey_dup(dsa)

## Functions
VALUE | ossl_dsa_new (EVP_PKEY *pkey)
void | Init_ossl_dsa (void)

## Variables
VALUE | cDSA
VALUE | eDSAError

## Macro Definition Documentation

## ◆ DSAPublicKey_dup

#define DSAPublicKey_dup | ( |  | dsa | ) |

Value:
(DSA *)ASN1_dup( \
(i2d_of_void *)i2d_DSAPublicKey, (d2i_of_void *)d2i_DSAPublicKey, (char *)(dsa))

## ◆ GetDSA

#define GetDSA | ( |  | obj,
|  |  | dsa
| ) |  |

Value:
do { \
EVP_PKEY *_pkey; \
GetPKeyDSA((obj), _pkey); \
(dsa) = EVP_PKEY_get0_DSA(_pkey); \
} while (0)

Definition at line 20 of file ossl_pkey_dsa.c.

## ◆ GetPKeyDSA

#define GetPKeyDSA | ( |  | obj,
|  |  | pkey
| ) |  |

Value:
do { \
GetPKey((obj), (pkey)); \
if (EVP_PKEY_base_id(pkey) != EVP_PKEY_DSA) { /* PARANOIA? */ \
ossl_raise(rb_eRuntimeError, "THIS IS NOT A DSA!"); \
} \
} while (0)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

Definition at line 14 of file ossl_pkey_dsa.c.

## ◆ PEM_read_bio_DSAPublicKey

#define PEM_read_bio_DSAPublicKey | ( |  | bp,
|  |  | x,
|  |  | cb,
|  |  | u
| ) |  |

Value:
(DSA *)PEM_ASN1_read_bio( \
(d2i_of_void *)d2i_DSAPublicKey, PEM_STRING_DSA_PUBLIC, (bp), (void **)(x), (cb), (u))
bp
#define bp()
Definition: internal.h:105

## Function Documentation

## ◆ Init_ossl_dsa()

void Init_ossl_dsa | ( | void |  | ) |

Definition at line 609 of file ossl_pkey_dsa.c.

References cDSA, cPKey, DEF_OSSL_PKEY_BN, dsa_blocking_gen_arg::dsa, eDSAError, eOSSLError, ePKeyError, g, mOSSL, mPKey, priv_key, pub_key, rb_cObject, rb_define_alias(), rb_define_class_under(), rb_define_method, rb_define_module_under(), and rb_define_singleton_method.

Referenced by Init_ossl_pkey().

## ◆ ossl_dsa_new()

VALUE ossl_dsa_new | ( | EVP_PKEY * | pkey | ) |

Definition at line 72 of file ossl_pkey_dsa.c.

References cDSA, eDSAError, NewPKey, NULL, ossl_raise(), Qfalse, rb_eTypeError, and SetPKey.

## Variable Documentation

## ◆ cDSA

VALUE cDSA

Definition at line 43 of file ossl_pkey_dsa.c.

Referenced by Init_ossl_dsa(), and ossl_dsa_new().

## ◆ eDSAError

VALUE eDSAError

Definition at line 44 of file ossl_pkey_dsa.c.

Referenced by Init_ossl_dsa(), and ossl_dsa_new().