Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
Macros | Functions | Variables
ossl_x509cert.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define NewX509(klass)   TypedData_Wrap_Struct((klass), &ossl_x509_type, 0)
 
#define SetX509(obj, x509)
 
#define GetX509(obj, x509)
 

Functions

VALUE ossl_x509_new (X509 *x509)
 
X509 * GetX509CertPtr (VALUE obj)
 
X509 * DupX509CertPtr (VALUE obj)
 
void Init_ossl_x509cert (void)
 

Variables

VALUE cX509Cert
 
VALUE eX509CertError
 

Macro Definition Documentation

◆ GetX509

#define GetX509 (   obj,
  x509 
)
Value:
do { \
TypedData_Get_Struct((obj), X509, &ossl_x509_type, (x509)); \
if (!(x509)) { \
ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
} \
} while (0)

Definition at line 20 of file ossl_x509cert.c.

◆ NewX509

#define NewX509 (   klass)    TypedData_Wrap_Struct((klass), &ossl_x509_type, 0)

Definition at line 12 of file ossl_x509cert.c.

◆ SetX509

#define SetX509 (   obj,
  x509 
)
Value:
do { \
if (!(x509)) { \
ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
} \
RTYPEDDATA_DATA(obj) = (x509); \
} while (0)

Definition at line 14 of file ossl_x509cert.c.

Function Documentation

◆ DupX509CertPtr()

X509* DupX509CertPtr ( VALUE  obj)

Definition at line 81 of file ossl_x509cert.c.

References GetX509, obj, and X509_up_ref.

◆ GetX509CertPtr()

X509* GetX509CertPtr ( VALUE  obj)

Definition at line 71 of file ossl_x509cert.c.

References GetX509, and obj.

◆ Init_ossl_x509cert()

void Init_ossl_x509cert ( void  )

◆ ossl_x509_new()

VALUE ossl_x509_new ( X509 *  x509)

Definition at line 51 of file ossl_x509cert.c.

References cX509Cert, eX509CertError, NewX509, NULL, obj, ossl_raise(), and SetX509.

Variable Documentation

◆ cX509Cert

VALUE cX509Cert

Definition at line 30 of file ossl_x509cert.c.

Referenced by Init_ossl_x509cert(), and ossl_x509_new().

◆ eX509CertError

VALUE eX509CertError

Definition at line 31 of file ossl_x509cert.c.

Referenced by Init_ossl_x509cert(), and ossl_x509_new().

obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.1.h:5703
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920