Defines | Functions | Variables

ext/openssl/ossl_x509req.c File Reference

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

Go to the source code of this file.

Defines

#define WrapX509Req(klass, obj, req)
#define GetX509Req(obj, req)
#define SafeGetX509Req(obj, req)

Functions

VALUE ossl_x509req_new (X509_REQ *req)
X509_REQ * GetX509ReqPtr (VALUE obj)
X509_REQ * DupX509ReqPtr (VALUE obj)
static VALUE ossl_x509req_alloc (VALUE klass)
static VALUE ossl_x509req_initialize (int argc, VALUE *argv, VALUE self)
static VALUE ossl_x509req_copy (VALUE self, VALUE other)
static VALUE ossl_x509req_to_pem (VALUE self)
static VALUE ossl_x509req_to_der (VALUE self)
static VALUE ossl_x509req_to_text (VALUE self)
static VALUE ossl_x509req_get_version (VALUE self)
static VALUE ossl_x509req_set_version (VALUE self, VALUE version)
static VALUE ossl_x509req_get_subject (VALUE self)
static VALUE ossl_x509req_set_subject (VALUE self, VALUE subject)
static VALUE ossl_x509req_get_signature_algorithm (VALUE self)
static VALUE ossl_x509req_get_public_key (VALUE self)
static VALUE ossl_x509req_set_public_key (VALUE self, VALUE key)
static VALUE ossl_x509req_sign (VALUE self, VALUE key, VALUE digest)
static VALUE ossl_x509req_verify (VALUE self, VALUE key)
static VALUE ossl_x509req_get_attributes (VALUE self)
static VALUE ossl_x509req_set_attributes (VALUE self, VALUE ary)
static VALUE ossl_x509req_add_attribute (VALUE self, VALUE attr)
void Init_ossl_x509req ()

Variables

VALUE cX509Req
VALUE eX509ReqError

Define Documentation

#define GetX509Req (   obj,
  req 
)
#define SafeGetX509Req (   obj,
  req 
)
Value:
do { \
    OSSL_Check_Kind(obj, cX509Req); \
    GetX509Req(obj, req); \
} while (0)

Definition at line 25 of file ossl_x509req.c.

Referenced by DupX509ReqPtr(), GetX509ReqPtr(), and ossl_x509req_copy().

#define WrapX509Req (   klass,
  obj,
  req 
)
Value:
do { \
    if (!req) { \
        ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_REQ_free, req); \
} while (0)

Definition at line 13 of file ossl_x509req.c.

Referenced by ossl_x509req_alloc(), and ossl_x509req_new().


Function Documentation

X509_REQ* DupX509ReqPtr ( VALUE  obj  ) 

Definition at line 69 of file ossl_x509req.c.

References eX509ReqError, NULL, ossl_raise(), and SafeGetX509Req.

X509_REQ* GetX509ReqPtr ( VALUE  obj  ) 

Definition at line 59 of file ossl_x509req.c.

References SafeGetX509Req.

Referenced by ossl_x509extfactory_set_subject_req().

void Init_ossl_x509req ( void   ) 
static VALUE ossl_x509req_add_attribute ( VALUE  self,
VALUE  attr 
) [static]

Definition at line 425 of file ossl_x509req.c.

References DupX509AttrPtr(), eX509ReqError, GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_alloc ( VALUE  klass  )  [static]

Definition at line 85 of file ossl_x509req.c.

References eX509ReqError, NULL, ossl_raise(), and WrapX509Req.

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_copy ( VALUE  self,
VALUE  other 
) [static]

Definition at line 124 of file ossl_x509req.c.

References DATA_PTR, eX509ReqError, GetX509Req, NULL, ossl_raise(), rb_check_frozen(), and SafeGetX509Req.

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_get_attributes ( VALUE  self  )  [static]
static VALUE ossl_x509req_get_public_key ( VALUE  self  )  [static]

Definition at line 308 of file ossl_x509req.c.

References eX509ReqError, GetX509Req, NULL, ossl_pkey_new(), and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_get_signature_algorithm ( VALUE  self  )  [static]

Definition at line 285 of file ossl_x509req.c.

References buf, eX509ReqError, GetX509Req, NULL, ossl_raise(), and rb_str_new().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_get_subject ( VALUE  self  )  [static]

Definition at line 257 of file ossl_x509req.c.

References eX509ReqError, GetX509Req, name, NULL, ossl_raise(), and ossl_x509name_new().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_get_version ( VALUE  self  )  [static]

Definition at line 228 of file ossl_x509req.c.

References GetX509Req, and LONG2FIX.

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_initialize ( int  argc,
VALUE argv,
VALUE  self 
) [static]
VALUE ossl_x509req_new ( X509_REQ *  req  ) 

Definition at line 40 of file ossl_x509req.c.

References cX509Req, eX509ReqError, NULL, ossl_raise(), and WrapX509Req.

static VALUE ossl_x509req_set_attributes ( VALUE  self,
VALUE  ary 
) [static]
static VALUE ossl_x509req_set_public_key ( VALUE  self,
VALUE  key 
) [static]

Definition at line 322 of file ossl_x509req.c.

References eX509ReqError, GetPKeyPtr(), GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_set_subject ( VALUE  self,
VALUE  subject 
) [static]

Definition at line 271 of file ossl_x509req.c.

References eX509ReqError, GetX509NamePtr(), GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_set_version ( VALUE  self,
VALUE  version 
) [static]

Definition at line 240 of file ossl_x509req.c.

References eX509ReqError, FIX2LONG, GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_sign ( VALUE  self,
VALUE  key,
VALUE  digest 
) [static]

Definition at line 337 of file ossl_x509req.c.

References eX509ReqError, GetDigestPtr(), GetPrivPKeyPtr(), GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_to_der ( VALUE  self  )  [static]
static VALUE ossl_x509req_to_pem ( VALUE  self  )  [static]

Definition at line 142 of file ossl_x509req.c.

References buf, eX509ReqError, GetX509Req, NULL, ossl_raise(), and rb_str_new().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_to_text ( VALUE  self  )  [static]

Definition at line 185 of file ossl_x509req.c.

References buf, eX509ReqError, GetX509Req, NULL, ossl_raise(), and rb_str_new().

Referenced by Init_ossl_x509req().

static VALUE ossl_x509req_verify ( VALUE  self,
VALUE  key 
) [static]

Definition at line 357 of file ossl_x509req.c.

References eX509ReqError, GetPKeyPtr(), GetX509Req, NULL, and ossl_raise().

Referenced by Init_ossl_x509req().


Variable Documentation

Definition at line 33 of file ossl_x509req.c.

Referenced by Init_ossl_x509req(), and ossl_x509req_new().