Ruby  2.4.2p198(2017-09-14revision59899)
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 #if defined(HAVE_ASN1_TIME_ADJ)
18 /* Splits VALUE to seconds and offset days. VALUE is typically a Time or an
19  * Integer. This is used when updating ASN1_*TIME with ASN1_TIME_adj() or
20  * X509_time_adj_ex(). We can't use ASN1_TIME_set() and X509_time_adj() because
21  * they have the Year 2038 issue on sizeof(time_t) == 4 environment */
22 void ossl_time_split(VALUE, time_t *, int *);
23 #else
24 time_t time_to_time_t(VALUE);
25 #endif
26 
27 /*
28  * ASN1_STRING conversions
29  */
30 VALUE asn1str_to_str(const ASN1_STRING *);
31 
32 /*
33  * ASN1_INTEGER conversions
34  */
35 VALUE asn1integer_to_num(const ASN1_INTEGER *);
36 ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
37 
38 /*
39  * ASN1 module
40  */
41 extern VALUE mASN1;
42 extern VALUE eASN1Error;
43 
44 extern VALUE cASN1Data;
45 extern VALUE cASN1Primitive;
47 
48 extern VALUE cASN1Boolean; /* BOOLEAN */
49 extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
50 extern VALUE cASN1BitString; /* BIT STRING */
51 extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
57 extern VALUE cASN1Null; /* NULL */
58 extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
59 extern VALUE cASN1UTCTime, cASN1GeneralizedTime; /* TIME */
60 extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
61 
62 ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
63 
64 void Init_ossl_asn1(void);
65 
66 #endif
VALUE asn1time_to_time(const ASN1_TIME *)
Definition: ossl_asn1.c:22
ASN1_TYPE * ossl_asn1_get_asn1type(VALUE)
Definition: ossl_asn1.c:514
VALUE cASN1NumericString
Definition: ossl_asn1.c:178
VALUE cASN1OctetString
Definition: ossl_asn1.c:177
ASN1_INTEGER * num_to_asn1integer(VALUE, ASN1_INTEGER *)
Definition: ossl_asn1.c:135
VALUE cASN1BitString
Definition: ossl_asn1.c:176
VALUE cASN1T61String
Definition: ossl_asn1.c:179
VALUE cASN1UTCTime
Definition: ossl_asn1.c:185
VALUE asn1integer_to_num(const ASN1_INTEGER *)
Definition: ossl_asn1.c:112
VALUE cASN1ObjectId
Definition: ossl_asn1.c:184
VALUE cASN1Sequence
Definition: ossl_asn1.c:186
VALUE cASN1Data
Definition: ossl_asn1.c:169
VALUE cASN1Integer
Definition: ossl_asn1.c:175
VALUE cASN1ISO64String
Definition: ossl_asn1.c:181
VALUE cASN1IA5String
Definition: ossl_asn1.c:180
VALUE eASN1Error
Definition: ossl_asn1.c:167
VALUE cASN1GraphicString
Definition: ossl_asn1.c:180
VALUE cASN1VideotexString
Definition: ossl_asn1.c:179
VALUE cASN1Primitive
Definition: ossl_asn1.c:170
VALUE cASN1GeneralizedTime
Definition: ossl_asn1.c:185
VALUE cASN1Constructive
Definition: ossl_asn1.c:171
time_t time_to_time_t(VALUE)
Definition: ossl_asn1.c:93
unsigned long VALUE
Definition: ruby.h:85
VALUE cASN1Enumerated
Definition: ossl_asn1.c:175
VALUE cASN1GeneralString
Definition: ossl_asn1.c:181
VALUE cASN1Null
Definition: ossl_asn1.c:183
VALUE cASN1PrintableString
Definition: ossl_asn1.c:178
VALUE mASN1
Definition: ossl_asn1.c:166
VALUE cASN1Set
Definition: ossl_asn1.c:186
VALUE asn1str_to_str(const ASN1_STRING *)
Definition: ossl_asn1.c:103
VALUE cASN1BMPString
Definition: ossl_asn1.c:182
VALUE cASN1UniversalString
Definition: ossl_asn1.c:182
VALUE cASN1UTF8String
Definition: ossl_asn1.c:177
void Init_ossl_asn1(void)
Definition: ossl_asn1.c:1413
VALUE cASN1Boolean
Definition: ossl_asn1.c:174