Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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 */
21 void 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 *);
32 ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
33
34 /*
35 * ASN1 module
36 */
37 extern VALUE mASN1;
38 extern VALUE eASN1Error;
39
40 extern VALUE cASN1Data;
41 extern VALUE cASN1Primitive;
42 extern VALUE cASN1Constructive;
43
44 extern VALUE cASN1Boolean; /* BOOLEAN */
45 extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
46 extern 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;
53 extern VALUE cASN1Null; /* NULL */
54 extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
55 extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
56 extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
57
58 ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
59
60 void Init_ossl_asn1(void);
61
62 #endif
cASN1Primitive
VALUE cASN1Primitive
Definition: ossl_asn1.c:159
num_to_asn1integer
ASN1_INTEGER * num_to_asn1integer(VALUE, ASN1_INTEGER *)
Definition: ossl_asn1.c:124
cASN1VideotexString
VALUE cASN1VideotexString
Definition: ossl_asn1.h:49
time_t
long time_t
Definition: rb_mjit_min_header-2.7.0.h:1236
cASN1UTCTime
VALUE cASN1UTCTime
Definition: ossl_asn1.c:174
cASN1UTF8String
VALUE cASN1UTF8String
Definition: ossl_asn1.h:47
cASN1GraphicString
VALUE cASN1GraphicString
Definition: ossl_asn1.h:50
asn1integer_to_num
VALUE asn1integer_to_num(const ASN1_INTEGER *)
Definition: ossl_asn1.c:101
cASN1ObjectId
VALUE cASN1ObjectId
Definition: ossl_asn1.c:173
VALUE
unsigned long VALUE
Definition: ruby.h:102
eASN1Error
VALUE eASN1Error
Definition: ossl_asn1.c:156
ossl_asn1_get_asn1type
ASN1_TYPE * ossl_asn1_get_asn1type(VALUE)
Definition: ossl_asn1.c:495
cASN1Set
VALUE cASN1Set
Definition: ossl_asn1.h:56
Init_ossl_asn1
void Init_ossl_asn1(void)
Definition: ossl_asn1.c:1361
cASN1IA5String
VALUE cASN1IA5String
Definition: ossl_asn1.c:169
cASN1GeneralizedTime
VALUE cASN1GeneralizedTime
Definition: ossl_asn1.h:55
cASN1BitString
VALUE cASN1BitString
Definition: ossl_asn1.c:165
cASN1Constructive
VALUE cASN1Constructive
Definition: ossl_asn1.c:160
ossl_time_split
void ossl_time_split(VALUE, time_t *, int *)
Definition: ossl_asn1.c:73
cASN1Boolean
VALUE cASN1Boolean
Definition: ossl_asn1.c:163
cASN1Enumerated
VALUE cASN1Enumerated
Definition: ossl_asn1.h:45
mASN1
VALUE mASN1
Definition: ossl_asn1.c:155
cASN1T61String
VALUE cASN1T61String
Definition: ossl_asn1.c:168
asn1str_to_str
VALUE asn1str_to_str(const ASN1_STRING *)
Definition: ossl_asn1.c:92
cASN1OctetString
VALUE cASN1OctetString
Definition: ossl_asn1.c:166
cASN1Data
VALUE cASN1Data
Definition: ossl_asn1.c:158
cASN1GeneralString
VALUE cASN1GeneralString
Definition: ossl_asn1.h:51
cASN1Sequence
VALUE cASN1Sequence
Definition: ossl_asn1.c:175
cASN1PrintableString
VALUE cASN1PrintableString
Definition: ossl_asn1.h:48
cASN1ISO64String
VALUE cASN1ISO64String
Definition: ossl_asn1.c:170
cASN1Integer
VALUE cASN1Integer
Definition: ossl_asn1.c:164
cASN1NumericString
VALUE cASN1NumericString
Definition: ossl_asn1.c:167
cASN1Null
VALUE cASN1Null
Definition: ossl_asn1.c:172
cASN1BMPString
VALUE cASN1BMPString
Definition: ossl_asn1.h:52
asn1time_to_time
VALUE asn1time_to_time(const ASN1_TIME *)
Definition: ossl_asn1.c:20
cASN1UniversalString
VALUE cASN1UniversalString
Definition: ossl_asn1.c:171