Ruby: ext/openssl/ossl_asn1.h Source File

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

ossl_asn1.h
Go to the documentation of this file.
1/*
2 * 'OpenSSL for Ruby' team members
3 * Copyright (C) 2003
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_ASN1_H_)
11#define _OSSL_ASN1_H_
12
13/*
14 * ASN1_DATE conversions
15 */
16 VALUE asn1time_to_time(const ASN1_TIME *);
17/* Splits VALUE to seconds and offset days. VALUE is typically a Time or an
18 * Integer. This is used when updating ASN1_*TIME with ASN1_TIME_adj() or
19 * X509_time_adj_ex(). We can't use ASN1_TIME_set() and X509_time_adj() because
20 * they have the Year 2038 issue on sizeof(time_t) == 4 environment */
21void ossl_time_split(VALUE, time_t *, int *);
22
23/*
24 * ASN1_STRING conversions
25 */
26 VALUE asn1str_to_str(const ASN1_STRING *);
27
28/*
29 * ASN1_INTEGER conversions
30 */
31 VALUE asn1integer_to_num(const ASN1_INTEGER *);
32ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
33
34/*
35 * ASN1 module
36 */
37extern VALUE mASN1;
38extern VALUE eASN1Error;
39
40extern VALUE cASN1Data;
41extern VALUE cASN1Primitive;
42extern VALUE cASN1Constructive;
43
44extern VALUE cASN1Boolean; /* BOOLEAN */
45 extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
46extern VALUE cASN1BitString; /* BIT STRING */
47 extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
48 extern VALUE cASN1NumericString, cASN1PrintableString;
49 extern VALUE cASN1T61String, cASN1VideotexString;
50 extern VALUE cASN1IA5String, cASN1GraphicString;
51 extern VALUE cASN1ISO64String, cASN1GeneralString;
52 extern VALUE cASN1UniversalString, cASN1BMPString;
53extern VALUE cASN1Null; /* NULL */
54extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
55 extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
56 extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
57
58ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
59
60void Init_ossl_asn1(void);
61
62#endif
cASN1Boolean
VALUE cASN1Boolean
Definition: ossl_asn1.c:163
cASN1ObjectId
VALUE cASN1ObjectId
Definition: ossl_asn1.c:173
cASN1VideotexString
VALUE cASN1VideotexString
Definition: ossl_asn1.h:49
cASN1OctetString
VALUE cASN1OctetString
Definition: ossl_asn1.c:166
ossl_asn1_get_asn1type
ASN1_TYPE * ossl_asn1_get_asn1type(VALUE)
Definition: ossl_asn1.c:495
cASN1GeneralString
VALUE cASN1GeneralString
Definition: ossl_asn1.h:51
cASN1GeneralizedTime
VALUE cASN1GeneralizedTime
Definition: ossl_asn1.h:55
cASN1Data
VALUE cASN1Data
Definition: ossl_asn1.c:158
cASN1Primitive
VALUE cASN1Primitive
Definition: ossl_asn1.c:159
cASN1IA5String
VALUE cASN1IA5String
Definition: ossl_asn1.c:169
mASN1
VALUE mASN1
Definition: ossl_asn1.c:155
cASN1Sequence
VALUE cASN1Sequence
Definition: ossl_asn1.c:175
cASN1UTCTime
VALUE cASN1UTCTime
Definition: ossl_asn1.c:174
cASN1Enumerated
VALUE cASN1Enumerated
Definition: ossl_asn1.h:45
ossl_time_split
void ossl_time_split(VALUE, time_t *, int *)
Definition: ossl_asn1.c:73
eASN1Error
VALUE eASN1Error
Definition: ossl_asn1.c:156
cASN1BMPString
VALUE cASN1BMPString
Definition: ossl_asn1.h:52
cASN1Null
VALUE cASN1Null
Definition: ossl_asn1.c:172
num_to_asn1integer
ASN1_INTEGER * num_to_asn1integer(VALUE, ASN1_INTEGER *)
Definition: ossl_asn1.c:124
cASN1UniversalString
VALUE cASN1UniversalString
Definition: ossl_asn1.c:171
cASN1Constructive
VALUE cASN1Constructive
Definition: ossl_asn1.c:160
cASN1Integer
VALUE cASN1Integer
Definition: ossl_asn1.c:164
cASN1GraphicString
VALUE cASN1GraphicString
Definition: ossl_asn1.h:50
cASN1UTF8String
VALUE cASN1UTF8String
Definition: ossl_asn1.h:47
asn1integer_to_num
VALUE asn1integer_to_num(const ASN1_INTEGER *)
Definition: ossl_asn1.c:101
cASN1PrintableString
VALUE cASN1PrintableString
Definition: ossl_asn1.h:48
cASN1T61String
VALUE cASN1T61String
Definition: ossl_asn1.c:168
cASN1ISO64String
VALUE cASN1ISO64String
Definition: ossl_asn1.c:170
cASN1NumericString
VALUE cASN1NumericString
Definition: ossl_asn1.c:167
asn1time_to_time
VALUE asn1time_to_time(const ASN1_TIME *)
Definition: ossl_asn1.c:20
cASN1BitString
VALUE cASN1BitString
Definition: ossl_asn1.c:165
cASN1Set
VALUE cASN1Set
Definition: ossl_asn1.h:56
Init_ossl_asn1
void Init_ossl_asn1(void)
Definition: ossl_asn1.c:1385
asn1str_to_str
VALUE asn1str_to_str(const ASN1_STRING *)
Definition: ossl_asn1.c:92
VALUE
unsigned long VALUE
Definition: value.h:38