Ruby  2.5.0dev(2017-10-22revision60238)
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;
43 
44 extern VALUE cASN1Boolean; /* BOOLEAN */
45 extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
46 extern VALUE cASN1BitString; /* BIT STRING */
47 extern VALUE cASN1OctetString, cASN1UTF8String; /* STRINGs */
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
VALUE asn1time_to_time(const ASN1_TIME *)
Definition: ossl_asn1.c:20
ASN1_TYPE * ossl_asn1_get_asn1type(VALUE)
Definition: ossl_asn1.c:495
VALUE cASN1NumericString
Definition: ossl_asn1.c:167
VALUE cASN1OctetString
Definition: ossl_asn1.c:166
ASN1_INTEGER * num_to_asn1integer(VALUE, ASN1_INTEGER *)
Definition: ossl_asn1.c:124
VALUE cASN1BitString
Definition: ossl_asn1.c:165
VALUE cASN1T61String
Definition: ossl_asn1.c:168
VALUE cASN1UTCTime
Definition: ossl_asn1.c:174
VALUE asn1integer_to_num(const ASN1_INTEGER *)
Definition: ossl_asn1.c:101
VALUE cASN1ObjectId
Definition: ossl_asn1.c:173
VALUE cASN1Sequence
Definition: ossl_asn1.c:175
VALUE cASN1Data
Definition: ossl_asn1.c:158
VALUE cASN1Integer
Definition: ossl_asn1.c:164
VALUE cASN1ISO64String
Definition: ossl_asn1.c:170
VALUE cASN1IA5String
Definition: ossl_asn1.c:169
VALUE eASN1Error
Definition: ossl_asn1.c:156
VALUE cASN1GraphicString
Definition: ossl_asn1.c:169
VALUE cASN1VideotexString
Definition: ossl_asn1.c:168
VALUE cASN1Primitive
Definition: ossl_asn1.c:159
VALUE cASN1GeneralizedTime
Definition: ossl_asn1.c:174
VALUE cASN1Constructive
Definition: ossl_asn1.c:160
unsigned long VALUE
Definition: ruby.h:85
VALUE cASN1Enumerated
Definition: ossl_asn1.c:164
void ossl_time_split(VALUE, time_t *, int *)
Definition: ossl_asn1.c:73
VALUE cASN1GeneralString
Definition: ossl_asn1.c:170
VALUE cASN1Null
Definition: ossl_asn1.c:172
VALUE cASN1PrintableString
Definition: ossl_asn1.c:167
VALUE mASN1
Definition: ossl_asn1.c:155
VALUE cASN1Set
Definition: ossl_asn1.c:175
VALUE asn1str_to_str(const ASN1_STRING *)
Definition: ossl_asn1.c:92
VALUE cASN1BMPString
Definition: ossl_asn1.c:171
VALUE cASN1UniversalString
Definition: ossl_asn1.c:171
VALUE cASN1UTF8String
Definition: ossl_asn1.c:166
void Init_ossl_asn1(void)
Definition: ossl_asn1.c:1361
VALUE cASN1Boolean
Definition: ossl_asn1.c:163