Ruby  2.5.0dev(2017-10-22revision60238)
ossl_x509.h
Go to the documentation of this file.
1 /*
2  * 'OpenSSL for Ruby' project
3  * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
4  * All rights reserved.
5  */
6 /*
7  * This program is licensed under the same licence as Ruby.
8  * (See the file 'LICENCE'.)
9  */
10 #if !defined(_OSSL_X509_H_)
11 #define _OSSL_X509_H_
12 
13 /*
14  * X509 main module
15  */
16 extern VALUE mX509;
17 
18 /*
19  * Converts the VALUE into Integer and set it to the ASN1_TIME. This is a
20  * wrapper for X509_time_adj_ex() so passing NULL creates a new ASN1_TIME.
21  * Note that the caller must check the NULL return.
22  */
23 ASN1_TIME *ossl_x509_time_adjust(ASN1_TIME *, VALUE);
24 
25 void Init_ossl_x509(void);
26 
27 /*
28  * X509Attr
29  */
30 extern VALUE cX509Attr;
31 extern VALUE eX509AttrError;
32 
33 VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
34 X509_ATTRIBUTE *GetX509AttrPtr(VALUE);
35 void Init_ossl_x509attr(void);
36 
37 /*
38  * X509Cert
39  */
40 extern VALUE cX509Cert;
41 extern VALUE eX509CertError;
42 
43 VALUE ossl_x509_new(X509 *);
44 X509 *GetX509CertPtr(VALUE);
45 X509 *DupX509CertPtr(VALUE);
46 void Init_ossl_x509cert(void);
47 
48 /*
49  * X509CRL
50  */
51 extern VALUE cX509CRL;
52 extern VALUE eX509CRLError;
53 
54 VALUE ossl_x509crl_new(X509_CRL *);
55 X509_CRL *GetX509CRLPtr(VALUE);
56 void Init_ossl_x509crl(void);
57 
58 /*
59  * X509Extension
60  */
61 extern VALUE cX509Ext;
62 extern VALUE cX509ExtFactory;
63 extern VALUE eX509ExtError;
64 
65 VALUE ossl_x509ext_new(X509_EXTENSION *);
66 X509_EXTENSION *GetX509ExtPtr(VALUE);
67 void Init_ossl_x509ext(void);
68 
69 /*
70  * X509Name
71  */
72 extern VALUE cX509Name;
73 extern VALUE eX509NameError;
74 
75 VALUE ossl_x509name_new(X509_NAME *);
76 X509_NAME *GetX509NamePtr(VALUE);
77 void Init_ossl_x509name(void);
78 
79 /*
80  * X509Request
81  */
82 extern VALUE cX509Req;
83 extern VALUE eX509ReqError;
84 
85 X509_REQ *GetX509ReqPtr(VALUE);
86 void Init_ossl_x509req(void);
87 
88 /*
89  * X509Revoked
90  */
91 extern VALUE cX509Rev;
92 extern VALUE eX509RevError;
93 
94 VALUE ossl_x509revoked_new(X509_REVOKED *);
95 X509_REVOKED *DupX509RevokedPtr(VALUE);
96 void Init_ossl_x509revoked(void);
97 
98 /*
99  * X509Store and X509StoreContext
100  */
101 extern VALUE cX509Store;
102 extern VALUE cX509StoreContext;
103 extern VALUE eX509StoreError;
104 
105 X509_STORE *GetX509StorePtr(VALUE);
106 
107 void Init_ossl_x509store(void);
108 
109 /*
110  * Calls the verify callback Proc (the first parameter) with given pre-verify
111  * result and the X509_STORE_CTX.
112  */
113 int ossl_verify_cb_call(VALUE, int, X509_STORE_CTX *);
114 
115 #endif /* _OSSL_X509_H_ */
void Init_ossl_x509ext(void)
Definition: ossl_x509ext.c:438
VALUE ossl_x509crl_new(X509_CRL *)
Definition: ossl_x509crl.c:61
void Init_ossl_x509revoked(void)
VALUE cX509ExtFactory
Definition: ossl_x509ext.c:44
VALUE eX509ReqError
Definition: ossl_x509req.c:31
VALUE eX509CRLError
Definition: ossl_x509crl.c:31
VALUE cX509CRL
Definition: ossl_x509crl.c:30
VALUE eX509NameError
Definition: ossl_x509name.c:36
X509_ATTRIBUTE * GetX509AttrPtr(VALUE)
Definition: ossl_x509attr.c:71
VALUE cX509Ext
Definition: ossl_x509ext.c:43
VALUE eX509StoreError
X509_NAME * GetX509NamePtr(VALUE)
Definition: ossl_x509name.c:76
X509_REVOKED * DupX509RevokedPtr(VALUE)
VALUE cX509Rev
void Init_ossl_x509req(void)
Definition: ossl_x509req.c:409
X509 * GetX509CertPtr(VALUE)
Definition: ossl_x509cert.c:71
VALUE cX509Cert
Definition: ossl_x509cert.c:30
VALUE eX509CertError
Definition: ossl_x509cert.c:31
VALUE eX509ExtError
Definition: ossl_x509ext.c:45
void Init_ossl_x509name(void)
VALUE mX509
Definition: ossl_x509.c:12
VALUE cX509Store
VALUE ossl_x509_new(X509 *)
Definition: ossl_x509cert.c:51
VALUE ossl_x509ext_new(X509_EXTENSION *)
Definition: ossl_x509ext.c:65
VALUE eX509AttrError
Definition: ossl_x509attr.c:31
VALUE cX509StoreContext
int ossl_verify_cb_call(VALUE, int, X509_STORE_CTX *)
void Init_ossl_x509(void)
Definition: ossl_x509.c:30
ASN1_TIME * ossl_x509_time_adjust(ASN1_TIME *, VALUE)
Definition: ossl_x509.c:19
unsigned long VALUE
Definition: ruby.h:85
VALUE cX509Req
Definition: ossl_x509req.c:30
VALUE ossl_x509revoked_new(X509_REVOKED *)
X509_STORE * GetX509StorePtr(VALUE)
X509_EXTENSION * GetX509ExtPtr(VALUE)
Definition: ossl_x509ext.c:85
void Init_ossl_x509crl(void)
Definition: ossl_x509crl.c:502
VALUE ossl_x509attr_new(X509_ATTRIBUTE *)
Definition: ossl_x509attr.c:51
void Init_ossl_x509attr(void)
VALUE eX509RevError
X509 * DupX509CertPtr(VALUE)
Definition: ossl_x509cert.c:81
void Init_ossl_x509store(void)
VALUE ossl_x509name_new(X509_NAME *)
Definition: ossl_x509name.c:56
VALUE cX509Name
Definition: ossl_x509name.c:35
X509_CRL * GetX509CRLPtr(VALUE)
Definition: ossl_x509crl.c:51
void Init_ossl_x509cert(void)
X509_REQ * GetX509ReqPtr(VALUE)
Definition: ossl_x509req.c:51
VALUE cX509Attr
Definition: ossl_x509attr.c:30