Ruby: ext/openssl/openssl_missing.h File Reference

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

Macros | Functions | Variables
openssl_missing.h File Reference
`#include "ruby/config.h"`

Go to the source code of this file.

## Macros
#define | EC_curve_nist2nid ossl_EC_curve_nist2nid
#define | X509_REVOKED_dup(rev)
#define | X509_STORE_CTX_get0_store(x) ((x)->ctx)
#define | SSL_is_server(s) ((s)->server)
#define | BN_GENCB_new() ((BN_GENCB *)OPENSSL_malloc(sizeof(BN_GENCB)))
#define | BN_GENCB_free(cb) OPENSSL_free(cb)
#define | BN_GENCB_get_arg(cb) (cb)->arg
#define | EVP_MD_CTX_new EVP_MD_CTX_create
#define | EVP_MD_CTX_free EVP_MD_CTX_destroy
#define | HMAC_CTX_new ossl_HMAC_CTX_new
#define | HMAC_CTX_free ossl_HMAC_CTX_free
#define | X509_STORE_get_ex_data(x, idx) CRYPTO_get_ex_data(&(x)->ex_data, (idx))
#define | X509_STORE_set_ex_data(x, idx, data) CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))
#define | X509_STORE_get_ex_new_index(l, p, newf, dupf, freef)
#define | X509_CRL_get0_signature ossl_X509_CRL_get0_signature
#define | X509_REQ_get0_signature ossl_X509_REQ_get0_signature
#define | X509_REVOKED_get0_serialNumber(x) ((x)->serialNumber)
#define | X509_REVOKED_get0_revocationDate(x) ((x)->revocationDate)
#define | X509_get0_tbs_sigalg(x) ((x)->cert_info->signature)
#define | X509_STORE_CTX_get0_untrusted(x) ((x)->untrusted)
#define | X509_STORE_CTX_get0_cert(x) ((x)->cert)
#define | X509_STORE_CTX_get0_chain(ctx) X509_STORE_CTX_get_chain(ctx)
#define | OCSP_SINGLERESP_get0_id(s) ((s)->certId)
#define | SSL_CTX_get_ciphers(ctx) ((ctx)->cipher_list)
#define | X509_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509)
#define | X509_CRL_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_CRL);
#define | X509_STORE_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_STORE);
#define | SSL_SESSION_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_SSL_SESSION);
#define | EVP_PKEY_up_ref(x) CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_EVP_PKEY);
#define | IMPL_PKEY_GETTER(_type, _name)
#define | IMPL_KEY_ACCESSOR2(_type, _group, a1, a2, _fail_cond)
#define | IMPL_KEY_ACCESSOR3(_type, _group, a1, a2, a3, _fail_cond)
#define | EVP_CTRL_AEAD_GET_TAG EVP_CTRL_GCM_GET_TAG
#define | EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG
#define | EVP_CTRL_AEAD_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN
#define | X509_get0_notBefore(x) X509_get_notBefore(x)
#define | X509_get0_notAfter(x) X509_get_notAfter(x)
#define | X509_CRL_get0_lastUpdate(x) X509_CRL_get_lastUpdate(x)
#define | X509_CRL_get0_nextUpdate(x) X509_CRL_get_nextUpdate(x)
#define | X509_set1_notBefore(x, t) X509_set_notBefore(x, t)
#define | X509_set1_notAfter(x, t) X509_set_notAfter(x, t)
#define | X509_CRL_set1_lastUpdate(x, t) X509_CRL_set_lastUpdate(x, t)
#define | X509_CRL_set1_nextUpdate(x, t) X509_CRL_set_nextUpdate(x, t)
#define | SSL_SESSION_get_protocol_version(s) ((s)->ssl_version)
#define | TS_STATUS_INFO_get0_status(a) ((a)->status)
#define | TS_STATUS_INFO_get0_text(a) ((a)->text)
#define | TS_STATUS_INFO_get0_failure_info(a) ((a)->failure_info)
#define | TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
#define | TS_VERIFY_CTX_set_store(ctx, str) ((ctx)->store=(str))
#define | TS_VERIFY_CTX_add_flags(ctx, f) ((ctx)->flags |= (f))
#define | TS_RESP_CTX_set_time_cb(ctx, callback, dta)

## Functions
int | ossl_EC_curve_nist2nid (const char *)
HMAC_CTX * | ossl_HMAC_CTX_new (void)
void | ossl_HMAC_CTX_free (HMAC_CTX *)
void | ossl_X509_CRL_get0_signature (const X509_CRL *, const ASN1_BIT_STRING **, const X509_ALGOR **)
void | ossl_X509_REQ_get0_signature (const X509_REQ *, const ASN1_BIT_STRING **, const X509_ALGOR **)
| IMPL_KEY_ACCESSOR3 (RSA, key, n, e, d,(n==obj->n||e==obj->e||(obj->d &&d==obj->d))) IMPL_KEY_ACCESSOR2(DSA

## Variables
| key
| pub_key
| priv_key

## Macro Definition Documentation

## ◆ BN_GENCB_free

#define BN_GENCB_free | ( |  | cb | ) | OPENSSL_free(cb)

Definition at line 42 of file openssl_missing.h.

## ◆ BN_GENCB_get_arg

#define BN_GENCB_get_arg | ( |  | cb | ) | (cb)->arg

Definition at line 46 of file openssl_missing.h.

## ◆ BN_GENCB_new

#define BN_GENCB_new | ( |  | ) | ((BN_GENCB *)OPENSSL_malloc(sizeof(BN_GENCB)))

Definition at line 38 of file openssl_missing.h.

## ◆ EC_curve_nist2nid

#define EC_curve_nist2nid ossl_EC_curve_nist2nid

Definition at line 19 of file openssl_missing.h.

## ◆ EVP_CTRL_AEAD_GET_TAG

#define EVP_CTRL_AEAD_GET_TAG EVP_CTRL_GCM_GET_TAG

## ◆ EVP_CTRL_AEAD_SET_IVLEN

#define EVP_CTRL_AEAD_SET_IVLEN EVP_CTRL_GCM_SET_IVLEN

## ◆ EVP_CTRL_AEAD_SET_TAG

#define EVP_CTRL_AEAD_SET_TAG EVP_CTRL_GCM_SET_TAG

## ◆ EVP_MD_CTX_free

#define EVP_MD_CTX_free EVP_MD_CTX_destroy

Definition at line 54 of file openssl_missing.h.

## ◆ EVP_MD_CTX_new

#define EVP_MD_CTX_new EVP_MD_CTX_create

Definition at line 50 of file openssl_missing.h.

## ◆ EVP_PKEY_up_ref

#define EVP_PKEY_up_ref | ( |  | x | ) | CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_EVP_PKEY);

Definition at line 146 of file openssl_missing.h.

## ◆ HMAC_CTX_free

#define HMAC_CTX_free ossl_HMAC_CTX_free

Definition at line 64 of file openssl_missing.h.

## ◆ HMAC_CTX_new

#define HMAC_CTX_new ossl_HMAC_CTX_new

Definition at line 59 of file openssl_missing.h.

## ◆ IMPL_KEY_ACCESSOR2

#define IMPL_KEY_ACCESSOR2 | ( |  | _type,
|  |  | _group,
|  |  | a1,
|  |  | a2,
|  |  | _fail_cond
| ) |  |

Value:
static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2) { \
if (a1) *a1 = obj->a1; \
if (a2) *a2 = obj->a2; } \
static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2) { \
if (_fail_cond) return 0; \
BN_clear_free(obj->a1); obj->a1 = a1; \
BN_clear_free(obj->a2); obj->a2 = a2; \
return 1; }

Definition at line 155 of file openssl_missing.h.

## ◆ IMPL_KEY_ACCESSOR3

#define IMPL_KEY_ACCESSOR3 | ( |  | _type,
|  |  | _group,
|  |  | a1,
|  |  | a2,
|  |  | a3,
|  |  | _fail_cond
| ) |  |

Value:
static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2, const BIGNUM **a3) { \
if (a1) *a1 = obj->a1; \
if (a2) *a2 = obj->a2; \
if (a3) *a3 = obj->a3; } \
static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2, BIGNUM *a3) { \
if (_fail_cond) return 0; \
BN_clear_free(obj->a1); obj->a1 = a1; \
BN_clear_free(obj->a2); obj->a2 = a2; \
BN_clear_free(obj->a3); obj->a3 = a3; \
return 1; }

Definition at line 164 of file openssl_missing.h.

## ◆ IMPL_PKEY_GETTER

#define IMPL_PKEY_GETTER | ( |  | _type,
|  |  | _name
| ) |  |

Value:
static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \
return pkey->pkey._name; }

Definition at line 152 of file openssl_missing.h.

## ◆ OCSP_SINGLERESP_get0_id

#define OCSP_SINGLERESP_get0_id | ( |  | s | ) | ((s)->certId)

Definition at line 118 of file openssl_missing.h.

## ◆ SSL_CTX_get_ciphers

#define SSL_CTX_get_ciphers | ( |  | ctx | ) | ((ctx)->cipher_list)

Definition at line 122 of file openssl_missing.h.

## ◆ SSL_is_server

#define SSL_is_server | ( |  | s | ) | ((s)->server)

Definition at line 33 of file openssl_missing.h.

## ◆ SSL_SESSION_get_protocol_version

#define SSL_SESSION_get_protocol_version | ( |  | s | ) | ((s)->ssl_version)

## ◆ SSL_SESSION_up_ref

#define SSL_SESSION_up_ref | ( |  | x | ) | CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_SSL_SESSION);

Definition at line 141 of file openssl_missing.h.

## ◆ TS_RESP_CTX_set_time_cb

#define TS_RESP_CTX_set_time_cb | ( |  | ctx,
|  |  | callback,
|  |  | dta
| ) |  |

Value:
do { \
(ctx)->time_cb = (callback); \
(ctx)->time_cb_data = (dta); \
} while (0)

## ◆ TS_STATUS_INFO_get0_failure_info

#define TS_STATUS_INFO_get0_failure_info | ( |  | a | ) | ((a)->failure_info)

## ◆ TS_STATUS_INFO_get0_status

#define TS_STATUS_INFO_get0_status | ( |  | a | ) | ((a)->status)

## ◆ TS_STATUS_INFO_get0_text

#define TS_STATUS_INFO_get0_text | ( |  | a | ) | ((a)->text)

## ◆ TS_VERIFY_CTS_set_certs

#define TS_VERIFY_CTS_set_certs | ( |  | ctx,
|  |  | crts
| ) |  | ((ctx)->certs=(crts))

## ◆ TS_VERIFY_CTX_add_flags

#define TS_VERIFY_CTX_add_flags | ( |  | ctx,
|  |  | f
| ) |  | ((ctx)->flags |= (f))

## ◆ TS_VERIFY_CTX_set_store

#define TS_VERIFY_CTX_set_store | ( |  | ctx,
|  |  | str
| ) |  | ((ctx)->store=(str))

## ◆ X509_CRL_get0_lastUpdate

#define X509_CRL_get0_lastUpdate | ( |  | x | ) | X509_CRL_get_lastUpdate(x)

## ◆ X509_CRL_get0_nextUpdate

#define X509_CRL_get0_nextUpdate | ( |  | x | ) | X509_CRL_get_nextUpdate(x)

## ◆ X509_CRL_get0_signature

#define X509_CRL_get0_signature ossl_X509_CRL_get0_signature

Definition at line 85 of file openssl_missing.h.

## ◆ X509_CRL_set1_lastUpdate

#define X509_CRL_set1_lastUpdate | ( |  | x,
|  |  | t
| ) |  | X509_CRL_set_lastUpdate(x, t)

## ◆ X509_CRL_set1_nextUpdate

#define X509_CRL_set1_nextUpdate | ( |  | x,
|  |  | t
| ) |  | X509_CRL_set_nextUpdate(x, t)

## ◆ X509_CRL_up_ref

#define X509_CRL_up_ref | ( |  | x | ) | CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_CRL);

Definition at line 131 of file openssl_missing.h.

## ◆ X509_get0_notAfter

#define X509_get0_notAfter | ( |  | x | ) | X509_get_notAfter(x)

## ◆ X509_get0_notBefore

#define X509_get0_notBefore | ( |  | x | ) | X509_get_notBefore(x)

## ◆ X509_get0_tbs_sigalg

#define X509_get0_tbs_sigalg | ( |  | x | ) | ((x)->cert_info->signature)

Definition at line 102 of file openssl_missing.h.

## ◆ X509_REQ_get0_signature

#define X509_REQ_get0_signature ossl_X509_REQ_get0_signature

Definition at line 90 of file openssl_missing.h.

## ◆ X509_REVOKED_dup

#define X509_REVOKED_dup | ( |  | rev | ) |

Value:
(X509_REVOKED *)ASN1_dup((i2d_of_void *)i2d_X509_REVOKED, \
(d2i_of_void *)d2i_X509_REVOKED, (char *)(rev))

Definition at line 24 of file openssl_missing.h.

## ◆ X509_REVOKED_get0_revocationDate

#define X509_REVOKED_get0_revocationDate | ( |  | x | ) | ((x)->revocationDate)

Definition at line 98 of file openssl_missing.h.

## ◆ X509_REVOKED_get0_serialNumber

#define X509_REVOKED_get0_serialNumber | ( |  | x | ) | ((x)->serialNumber)

Definition at line 94 of file openssl_missing.h.

## ◆ X509_set1_notAfter

#define X509_set1_notAfter | ( |  | x,
|  |  | t
| ) |  | X509_set_notAfter(x, t)

## ◆ X509_set1_notBefore

#define X509_set1_notBefore | ( |  | x,
|  |  | t
| ) |  | X509_set_notBefore(x, t)

## ◆ X509_STORE_CTX_get0_cert

#define X509_STORE_CTX_get0_cert | ( |  | x | ) | ((x)->cert)

Definition at line 110 of file openssl_missing.h.

## ◆ X509_STORE_CTX_get0_chain

#define X509_STORE_CTX_get0_chain | ( |  | ctx | ) | X509_STORE_CTX_get_chain(ctx)

Definition at line 114 of file openssl_missing.h.

## ◆ X509_STORE_CTX_get0_store

#define X509_STORE_CTX_get0_store | ( |  | x | ) | ((x)->ctx)

Definition at line 29 of file openssl_missing.h.

## ◆ X509_STORE_CTX_get0_untrusted

#define X509_STORE_CTX_get0_untrusted | ( |  | x | ) | ((x)->untrusted)

Definition at line 106 of file openssl_missing.h.

## ◆ X509_STORE_get_ex_data

#define X509_STORE_get_ex_data | ( |  | x,
|  |  | idx
| ) |  | CRYPTO_get_ex_data(&(x)->ex_data, (idx))

Definition at line 68 of file openssl_missing.h.

## ◆ X509_STORE_get_ex_new_index

#define X509_STORE_get_ex_new_index | ( |  | l,
|  |  | p,
|  |  | newf,
|  |  | dupf,
|  |  | freef
| ) |  |

Value:
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \
(newf), (dupf), (freef))

Definition at line 78 of file openssl_missing.h.

## ◆ X509_STORE_set_ex_data

#define X509_STORE_set_ex_data | ( |  | x,
|  |  | idx,
|  |  | data
| ) |  | CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data))

Definition at line 73 of file openssl_missing.h.

## ◆ X509_STORE_up_ref

#define X509_STORE_up_ref | ( |  | x | ) | CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509_STORE);

Definition at line 136 of file openssl_missing.h.

## ◆ X509_up_ref

#define X509_up_ref | ( |  | x | ) | CRYPTO_add(&(x)->references, 1, CRYPTO_LOCK_X509)

Definition at line 126 of file openssl_missing.h.

## Function Documentation

## ◆ IMPL_KEY_ACCESSOR3()

IMPL_KEY_ACCESSOR3 | ( | RSA | ,
|  | key | ,
|  | n | ,
|  | e | ,
|  | d | ,
|  | (n==obj->n||e==obj->e||(obj->d &&d==obj->d)) |
| ) |  |

## ◆ ossl_EC_curve_nist2nid()

int ossl_EC_curve_nist2nid | ( | const char * | name | ) |

Definition at line 48 of file openssl_missing.c.

References name, and nid.

## ◆ ossl_HMAC_CTX_free()

void ossl_HMAC_CTX_free | ( | HMAC_CTX * | ctx | ) |

Definition at line 75 of file openssl_missing.c.

## ◆ ossl_HMAC_CTX_new()

HMAC_CTX * ossl_HMAC_CTX_new | ( | void |  | ) |

Definition at line 63 of file openssl_missing.c.

References NULL.

## ◆ ossl_X509_CRL_get0_signature()

void ossl_X509_CRL_get0_signature | ( | const X509_CRL * | crl,
|  | const ASN1_BIT_STRING ** | psig,
|  | const X509_ALGOR ** | palg
| ) |  |

Definition at line 86 of file openssl_missing.c.

References NULL.

## ◆ ossl_X509_REQ_get0_signature()

void ossl_X509_REQ_get0_signature | ( | const X509_REQ * | req,
|  | const ASN1_BIT_STRING ** | psig,
|  | const X509_ALGOR ** | palg
| ) |  |

Definition at line 98 of file openssl_missing.c.

References NULL.

## Variable Documentation

## ◆ key

key

Definition at line 185 of file openssl_missing.h.

Referenced by crypt_r(), Init_ossl_ssl(), onig_st_insert_strend(), onig_st_lookup_strend(), rb_ary_assoc(), rb_class_ivar_set(), rb_env_clear(), rb_execarg_addopt(), rb_execarg_run_options(), rb_free_generic_ivar(), rb_gc_latest_gc_info(), rb_gc_stat(), rb_get_kwargs(), rb_hash_add_new_element(), rb_hash_aref(), rb_hash_aset(), rb_hash_assoc(), rb_hash_default_value(), rb_hash_delete(), rb_hash_delete_entry(), rb_hash_fetch(), rb_hash_has_key(), rb_hash_key_str(), rb_hash_lookup(), rb_hash_lookup2(), rb_hash_stlike_lookup(), rb_hash_stlike_update(), rb_id_table_delete(), rb_id_table_foreach(), rb_id_table_lookup(), rb_iseq_parameters(), rb_key_err_new(), rb_mv_generic_ivar(), rb_ractor_local_storage_delkey(), rb_ractor_local_storage_ptr(), rb_ractor_local_storage_ptr_newkey(), rb_ractor_local_storage_ptr_set(), rb_ractor_local_storage_value(), rb_ractor_local_storage_value_lookup(), rb_ractor_local_storage_value_set(), rb_vm_insn_addr2insn(), reg_open_vkey(), setkey_r(), sip_hash13(), st_add_direct(), st_delete(), st_delete_safe(), st_get_key(), st_insert(), st_insert2(), st_lookup(), st_shift(), and st_update().

## ◆ priv_key

priv_key

Definition at line 185 of file openssl_missing.h.

Referenced by Init_ossl_dh(), and Init_ossl_dsa().

## ◆ pub_key

pub_key

Definition at line 185 of file openssl_missing.h.

Referenced by Init_ossl_dh(), and Init_ossl_dsa().