Ruby  2.4.2p198(2017-09-14revision59899)
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 *);
45 X509 *GetX509CertPtr(VALUE);
46 X509 *DupX509CertPtr(VALUE);
47 void Init_ossl_x509cert(void);
48 
49 /*
50  * X509CRL
51  */
52 extern VALUE cX509CRL;
53 extern VALUE eX509CRLError;
54 
55 VALUE ossl_x509crl_new(X509_CRL *);
56 X509_CRL *GetX509CRLPtr(VALUE);
57 X509_CRL *DupX509CRLPtr(VALUE);
58 void Init_ossl_x509crl(void);
59 
60 /*
61  * X509Extension
62  */
63 extern VALUE cX509Ext;
64 extern VALUE cX509ExtFactory;
65 extern VALUE eX509ExtError;
66 
67 VALUE ossl_x509ext_new(X509_EXTENSION *);
68 X509_EXTENSION *GetX509ExtPtr(VALUE);
69 void Init_ossl_x509ext(void);
70 
71 /*
72  * X509Name
73  */
74 extern VALUE cX509Name;
75 extern VALUE eX509NameError;
76 
77 VALUE ossl_x509name_new(X509_NAME *);
78 X509_NAME *GetX509NamePtr(VALUE);
79 void Init_ossl_x509name(void);
80 
81 /*
82  * X509Request
83  */
84 extern VALUE cX509Req;
85 extern VALUE eX509ReqError;
86 
87 VALUE ossl_x509req_new(X509_REQ *);
88 X509_REQ *GetX509ReqPtr(VALUE);
89 X509_REQ *DupX509ReqPtr(VALUE);
90 void Init_ossl_x509req(void);
91 
92 /*
93  * X509Revoked
94  */
95 extern VALUE cX509Rev;
96 extern VALUE eX509RevError;
97 
98 VALUE ossl_x509revoked_new(X509_REVOKED *);
99 X509_REVOKED *DupX509RevokedPtr(VALUE);
100 void Init_ossl_x509revoked(void);
101 
102 /*
103  * X509Store and X509StoreContext
104  */
105 extern VALUE cX509Store;
106 extern VALUE cX509StoreContext;
107 extern VALUE eX509StoreError;
108 
109 VALUE ossl_x509store_new(X509_STORE *);
110 X509_STORE *GetX509StorePtr(VALUE);
111 X509_STORE *DupX509StorePtr(VALUE);
112 
113 X509_STORE_CTX *GetX509StCtxtPtr(VALUE);
114 void Init_ossl_x509store(void);
115 
116 /*
117  * Calls the verify callback Proc (the first parameter) with given pre-verify
118  * result and the X509_STORE_CTX.
119  */
120 int ossl_verify_cb_call(VALUE, int, X509_STORE_CTX *);
121 
122 #endif /* _OSSL_X509_H_ */
void Init_ossl_x509ext(void)
Definition: ossl_x509ext.c:442
VALUE ossl_x509crl_new(X509_CRL *)
Definition: ossl_x509crl.c:76
void Init_ossl_x509revoked(void)
VALUE cX509ExtFactory
Definition: ossl_x509ext.c:48
VALUE eX509ReqError
Definition: ossl_x509req.c:35
VALUE eX509CRLError
Definition: ossl_x509crl.c:35
VALUE cX509CRL
Definition: ossl_x509crl.c:34
VALUE eX509NameError
Definition: ossl_x509name.c:40
X509_STORE_CTX * GetX509StCtxtPtr(VALUE)
X509_ATTRIBUTE * GetX509AttrPtr(VALUE)
Definition: ossl_x509attr.c:75
VALUE cX509Ext
Definition: ossl_x509ext.c:47
VALUE eX509StoreError
X509_NAME * GetX509NamePtr(VALUE)
Definition: ossl_x509name.c:80
VALUE ossl_x509_new_from_file(VALUE)
Definition: ossl_x509cert.c:75
X509_REVOKED * DupX509RevokedPtr(VALUE)
VALUE ossl_x509store_new(X509_STORE *)
VALUE cX509Rev
void Init_ossl_x509req(void)
Definition: ossl_x509req.c:446
X509 * GetX509CertPtr(VALUE)
VALUE cX509Cert
Definition: ossl_x509cert.c:34
VALUE eX509CertError
Definition: ossl_x509cert.c:35
VALUE eX509ExtError
Definition: ossl_x509ext.c:49
void Init_ossl_x509name(void)
X509_REQ * DupX509ReqPtr(VALUE)
Definition: ossl_x509req.c:85
VALUE mX509
Definition: ossl_x509.c:12
VALUE cX509Store
VALUE ossl_x509_new(X509 *)
Definition: ossl_x509cert.c:55
VALUE ossl_x509ext_new(X509_EXTENSION *)
Definition: ossl_x509ext.c:69
X509_CRL * DupX509CRLPtr(VALUE)
Definition: ossl_x509crl.c:65
VALUE eX509AttrError
Definition: ossl_x509attr.c:35
VALUE cX509StoreContext
int ossl_verify_cb_call(VALUE, int, X509_STORE_CTX *)
void Init_ossl_x509(void)
Definition: ossl_x509.c:35
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:34
VALUE ossl_x509req_new(X509_REQ *)
Definition: ossl_x509req.c:55
VALUE ossl_x509revoked_new(X509_REVOKED *)
X509_STORE * GetX509StorePtr(VALUE)
X509_EXTENSION * GetX509ExtPtr(VALUE)
Definition: ossl_x509ext.c:89
void Init_ossl_x509crl(void)
Definition: ossl_x509crl.c:509
VALUE ossl_x509attr_new(X509_ATTRIBUTE *)
Definition: ossl_x509attr.c:55
void Init_ossl_x509attr(void)
VALUE eX509RevError
X509 * DupX509CertPtr(VALUE)
void Init_ossl_x509store(void)
VALUE ossl_x509name_new(X509_NAME *)
Definition: ossl_x509name.c:60
X509_STORE * DupX509StorePtr(VALUE)
VALUE cX509Name
Definition: ossl_x509name.c:39
X509_CRL * GetX509CRLPtr(VALUE)
Definition: ossl_x509crl.c:55
void Init_ossl_x509cert(void)
X509_REQ * GetX509ReqPtr(VALUE)
Definition: ossl_x509req.c:75
VALUE cX509Attr
Definition: ossl_x509attr.c:34