Ruby: ext/openssl/ossl_pkcs7.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

ossl_pkcs7.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_PKCS7_H_)
11#define _OSSL_PKCS7_H_
12
13#define NewPKCS7(klass) \
14 TypedData_Wrap_Struct((klass), &ossl_pkcs7_type, 0)
15#define SetPKCS7(obj, pkcs7) do { \
16 if (!(pkcs7)) { \
17 ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
18 } \
19 RTYPEDDATA_DATA(obj) = (pkcs7); \
20} while (0)
21#define GetPKCS7(obj, pkcs7) do { \
22 TypedData_Get_Struct((obj), PKCS7, &ossl_pkcs7_type, (pkcs7)); \
23 if (!(pkcs7)) { \
24 ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
25 } \
26} while (0)
27
28extern const rb_data_type_t ossl_pkcs7_type;
29extern VALUE cPKCS7;
30extern VALUE cPKCS7Signer;
31extern VALUE cPKCS7Recipient;
32extern VALUE ePKCS7Error;
33
34void Init_ossl_pkcs7(void);
35
36#endif /* _OSSL_PKCS7_H_ */
cPKCS7Recipient
VALUE cPKCS7Recipient
Definition: ossl_pkcs7.c:54
cPKCS7
VALUE cPKCS7
Definition: ossl_pkcs7.c:52
Init_ossl_pkcs7
void Init_ossl_pkcs7(void)
Definition: ossl_pkcs7.c:1028
ePKCS7Error
VALUE ePKCS7Error
Definition: ossl_pkcs7.c:55
ossl_pkcs7_type
const rb_data_type_t ossl_pkcs7_type
Definition: ossl_pkcs7.c:63
cPKCS7Signer
VALUE cPKCS7Signer
Definition: ossl_pkcs7.c:53
rb_data_type_struct
Definition: rtypeddata.h:70
VALUE
unsigned long VALUE
Definition: value.h:38