Defines | Functions | Variables

ext/openssl/ossl_pkcs12.c File Reference

#include "ossl.h"
Include dependency graph for ossl_pkcs12.c:

Go to the source code of this file.

Defines

#define WrapPKCS12(klass, obj, p12)
#define GetPKCS12(obj, p12)
#define SafeGetPKCS12(obj, p12)
#define ossl_pkcs12_set_key(o, v)   rb_iv_set((o), "@key", (v))
#define ossl_pkcs12_set_cert(o, v)   rb_iv_set((o), "@certificate", (v))
#define ossl_pkcs12_set_ca_certs(o, v)   rb_iv_set((o), "@ca_certs", (v))
#define ossl_pkcs12_get_key(o)   rb_iv_get((o), "@key")
#define ossl_pkcs12_get_cert(o)   rb_iv_get((o), "@certificate")
#define ossl_pkcs12_get_ca_certs(o)   rb_iv_get((o), "@ca_certs")

Functions

static VALUE ossl_pkcs12_s_allocate (VALUE klass)
static VALUE ossl_pkcs12_s_create (int argc, VALUE *argv, VALUE self)
static VALUE ossl_pkcs12_initialize (int argc, VALUE *argv, VALUE self)
static VALUE ossl_pkcs12_to_der (VALUE self)
void Init_ossl_pkcs12 ()

Variables

VALUE cPKCS12
VALUE ePKCS12Error

Define Documentation

#define GetPKCS12 (   obj,
  p12 
)
Value:
do { \
    Data_Get_Struct(obj, PKCS12, p12); \
    if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
} while (0)

Definition at line 13 of file ossl_pkcs12.c.

Referenced by ossl_pkcs12_to_der().

#define ossl_pkcs12_get_ca_certs (   o  )     rb_iv_get((o), "@ca_certs")

Definition at line 28 of file ossl_pkcs12.c.

#define ossl_pkcs12_get_cert (   o  )     rb_iv_get((o), "@certificate")

Definition at line 27 of file ossl_pkcs12.c.

#define ossl_pkcs12_get_key (   o  )     rb_iv_get((o), "@key")

Definition at line 26 of file ossl_pkcs12.c.

#define ossl_pkcs12_set_ca_certs (   o,
  v 
)    rb_iv_set((o), "@ca_certs", (v))

Definition at line 25 of file ossl_pkcs12.c.

Referenced by ossl_pkcs12_initialize(), and ossl_pkcs12_s_create().

#define ossl_pkcs12_set_cert (   o,
  v 
)    rb_iv_set((o), "@certificate", (v))

Definition at line 24 of file ossl_pkcs12.c.

Referenced by ossl_pkcs12_initialize(), and ossl_pkcs12_s_create().

#define ossl_pkcs12_set_key (   o,
  v 
)    rb_iv_set((o), "@key", (v))

Definition at line 23 of file ossl_pkcs12.c.

Referenced by ossl_pkcs12_initialize(), and ossl_pkcs12_s_create().

#define SafeGetPKCS12 (   obj,
  p12 
)
Value:
do { \
    OSSL_Check_Kind(obj, cPKCS12); \
    GetPKCS12(obj, p12); \
} while (0)

Definition at line 18 of file ossl_pkcs12.c.

#define WrapPKCS12 (   klass,
  obj,
  p12 
)
Value:
do { \
    if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
    obj = Data_Wrap_Struct(klass, 0, PKCS12_free, p12); \
} while (0)

Definition at line 8 of file ossl_pkcs12.c.

Referenced by ossl_pkcs12_s_allocate(), and ossl_pkcs12_s_create().


Function Documentation

void Init_ossl_pkcs12 ( void   ) 
static VALUE ossl_pkcs12_initialize ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ossl_pkcs12_s_allocate ( VALUE  klass  )  [static]

Definition at line 40 of file ossl_pkcs12.c.

References ePKCS12Error, NULL, ossl_raise(), and WrapPKCS12.

Referenced by Init_ossl_pkcs12().

static VALUE ossl_pkcs12_s_create ( int  argc,
VALUE argv,
VALUE  self 
) [static]
static VALUE ossl_pkcs12_to_der ( VALUE  self  )  [static]

Definition at line 175 of file ossl_pkcs12.c.

References ePKCS12Error, GetPKCS12, len, NULL, ossl_raise(), ossl_str_adjust, rb_str_new(), and RSTRING_PTR.

Referenced by Init_ossl_pkcs12().


Variable Documentation

Definition at line 33 of file ossl_pkcs12.c.

Referenced by Init_ossl_pkcs12(), and ossl_pkcs12_s_create().