Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
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 */
16VALUE 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 */
26VALUE asn1str_to_str(const ASN1_STRING *);
27
28/*
29 * ASN1_INTEGER conversions
30 */
31VALUE 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;
43
44extern VALUE cASN1Boolean; /* BOOLEAN */
45extern VALUE cASN1Integer, cASN1Enumerated; /* INTEGER */
46extern VALUE cASN1BitString; /* BIT STRING */
53extern VALUE cASN1Null; /* NULL */
54extern VALUE cASN1ObjectId; /* OBJECT IDENTIFIER */
56extern VALUE cASN1Sequence, cASN1Set; /* CONSTRUCTIVE */
57
59
60void Init_ossl_asn1(void);
61
62#endif
VALUE cASN1Boolean
Definition: ossl_asn1.c:163
VALUE cASN1ObjectId
Definition: ossl_asn1.c:173
VALUE cASN1VideotexString
Definition: ossl_asn1.h:49
VALUE cASN1OctetString
Definition: ossl_asn1.c:166
ASN1_TYPE * ossl_asn1_get_asn1type(VALUE)
Definition: ossl_asn1.c:495
VALUE cASN1GeneralString
Definition: ossl_asn1.h:51
VALUE cASN1GeneralizedTime
Definition: ossl_asn1.h:55
VALUE cASN1Data
Definition: ossl_asn1.c:158
VALUE cASN1Primitive
Definition: ossl_asn1.c:159
VALUE cASN1IA5String
Definition: ossl_asn1.c:169
VALUE mASN1
Definition: ossl_asn1.c:155
VALUE cASN1Sequence
Definition: ossl_asn1.c:175
VALUE cASN1UTCTime
Definition: ossl_asn1.c:174
VALUE cASN1Enumerated
Definition: ossl_asn1.h:45
void ossl_time_split(VALUE, time_t *, int *)
Definition: ossl_asn1.c:73
VALUE eASN1Error
Definition: ossl_asn1.c:156
VALUE cASN1BMPString
Definition: ossl_asn1.h:52
VALUE cASN1Null
Definition: ossl_asn1.c:172
ASN1_INTEGER * num_to_asn1integer(VALUE, ASN1_INTEGER *)
Definition: ossl_asn1.c:124
VALUE cASN1UniversalString
Definition: ossl_asn1.c:171
VALUE cASN1Constructive
Definition: ossl_asn1.c:160
VALUE cASN1Integer
Definition: ossl_asn1.c:164
VALUE cASN1GraphicString
Definition: ossl_asn1.h:50
VALUE cASN1UTF8String
Definition: ossl_asn1.h:47
VALUE asn1integer_to_num(const ASN1_INTEGER *)
Definition: ossl_asn1.c:101
VALUE cASN1PrintableString
Definition: ossl_asn1.h:48
VALUE cASN1T61String
Definition: ossl_asn1.c:168
VALUE cASN1ISO64String
Definition: ossl_asn1.c:170
VALUE cASN1NumericString
Definition: ossl_asn1.c:167
VALUE asn1time_to_time(const ASN1_TIME *)
Definition: ossl_asn1.c:20
VALUE cASN1BitString
Definition: ossl_asn1.c:165
VALUE cASN1Set
Definition: ossl_asn1.h:56
void Init_ossl_asn1(void)
Definition: ossl_asn1.c:1361
VALUE asn1str_to_str(const ASN1_STRING *)
Definition: ossl_asn1.c:92
unsigned long VALUE