Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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_ */
Init_ossl_x509crl
void Init_ossl_x509crl(void)
Definition: ossl_x509crl.c:505
cX509StoreContext
VALUE cX509StoreContext
Definition: ossl_x509store.c:105
Init_ossl_x509ext
void Init_ossl_x509ext(void)
Definition: ossl_x509ext.c:438
eX509CertError
VALUE eX509CertError
Definition: ossl_x509cert.c:31
ossl_x509name_new
VALUE ossl_x509name_new(X509_NAME *)
Definition: ossl_x509name.c:56
cX509Store
VALUE cX509Store
Definition: ossl_x509store.c:104
GetX509ExtPtr
X509_EXTENSION * GetX509ExtPtr(VALUE)
Definition: ossl_x509ext.c:85
Init_ossl_x509store
void Init_ossl_x509store(void)
Definition: ossl_x509store.c:770
VALUE
unsigned long VALUE
Definition: ruby.h:102
Init_ossl_x509
void Init_ossl_x509(void)
Definition: ossl_x509.c:30
ossl_x509_new
VALUE ossl_x509_new(X509 *)
Definition: ossl_x509cert.c:51
Init_ossl_x509attr
void Init_ossl_x509attr(void)
Definition: ossl_x509attr.c:305
ossl_x509revoked_new
VALUE ossl_x509revoked_new(X509_REVOKED *)
Definition: ossl_x509revoked.c:51
DupX509RevokedPtr
X509_REVOKED * DupX509RevokedPtr(VALUE)
Definition: ossl_x509revoked.c:71
ossl_verify_cb_call
int ossl_verify_cb_call(VALUE, int, X509_STORE_CTX *)
Definition: ossl_x509store.c:62
GetX509StorePtr
X509_STORE * GetX509StorePtr(VALUE)
Definition: ossl_x509store.c:126
cX509Attr
VALUE cX509Attr
Definition: ossl_x509attr.c:30
cX509ExtFactory
VALUE cX509ExtFactory
Definition: ossl_x509ext.c:44
Init_ossl_x509req
void Init_ossl_x509req(void)
Definition: ossl_x509req.c:409
eX509NameError
VALUE eX509NameError
Definition: ossl_x509name.c:36
ossl_x509crl_new
VALUE ossl_x509crl_new(X509_CRL *)
Definition: ossl_x509crl.c:61
Init_ossl_x509name
void Init_ossl_x509name(void)
Definition: ossl_x509name.c:503
cX509Ext
VALUE cX509Ext
Definition: ossl_x509ext.c:43
DupX509CertPtr
X509 * DupX509CertPtr(VALUE)
Definition: ossl_x509cert.c:81
GetX509CRLPtr
X509_CRL * GetX509CRLPtr(VALUE)
Definition: ossl_x509crl.c:51
GetX509CertPtr
X509 * GetX509CertPtr(VALUE)
Definition: ossl_x509cert.c:71
ossl_x509_time_adjust
ASN1_TIME * ossl_x509_time_adjust(ASN1_TIME *, VALUE)
Definition: ossl_x509.c:19
Init_ossl_x509revoked
void Init_ossl_x509revoked(void)
Definition: ossl_x509revoked.c:276
eX509StoreError
VALUE eX509StoreError
Definition: ossl_x509store.c:106
GetX509AttrPtr
X509_ATTRIBUTE * GetX509AttrPtr(VALUE)
Definition: ossl_x509attr.c:71
eX509CRLError
VALUE eX509CRLError
Definition: ossl_x509crl.c:31
eX509RevError
VALUE eX509RevError
Definition: ossl_x509revoked.c:31
eX509ExtError
VALUE eX509ExtError
Definition: ossl_x509ext.c:45
ossl_x509attr_new
VALUE ossl_x509attr_new(X509_ATTRIBUTE *)
Definition: ossl_x509attr.c:51
Init_ossl_x509cert
void Init_ossl_x509cert(void)
Definition: ossl_x509cert.c:711
ossl_x509ext_new
VALUE ossl_x509ext_new(X509_EXTENSION *)
Definition: ossl_x509ext.c:65
GetX509NamePtr
X509_NAME * GetX509NamePtr(VALUE)
Definition: ossl_x509name.c:76
cX509CRL
VALUE cX509CRL
Definition: ossl_x509crl.c:30
cX509Rev
VALUE cX509Rev
Definition: ossl_x509revoked.c:30
cX509Req
VALUE cX509Req
Definition: ossl_x509req.c:30
GetX509ReqPtr
X509_REQ * GetX509ReqPtr(VALUE)
Definition: ossl_x509req.c:51
eX509ReqError
VALUE eX509ReqError
Definition: ossl_x509req.c:31
eX509AttrError
VALUE eX509AttrError
Definition: ossl_x509attr.c:31
cX509Cert
VALUE cX509Cert
Definition: ossl_x509cert.c:30
mX509
VALUE mX509
Definition: ossl_x509.c:12
cX509Name
VALUE cX509Name
Definition: ossl_x509name.c:35