VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/crypto/asn1/asn1_local.h@ 108358

最後變更 在這個檔案從108358是 108206,由 vboxsync 提交於 6 週 前

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.0 KB
 
1/*
2 * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10/* Internal ASN1 structures and functions: not for application use */
11
12#include "crypto/asn1.h"
13
14typedef const ASN1_VALUE const_ASN1_VALUE;
15SKM_DEFINE_STACK_OF(const_ASN1_VALUE, const ASN1_VALUE, ASN1_VALUE)
16
17int ossl_asn1_time_to_tm(struct tm *tm, const ASN1_TIME *d);
18int ossl_asn1_utctime_to_tm(struct tm *tm, const ASN1_UTCTIME *d);
19
20/* ASN1 scan context structure */
21
22struct asn1_sctx_st {
23 /* The ASN1_ITEM associated with this field */
24 const ASN1_ITEM *it;
25 /* If ASN1_TEMPLATE associated with this field */
26 const ASN1_TEMPLATE *tt;
27 /* Various flags associated with field and context */
28 unsigned long flags;
29 /* If SEQUENCE OF or SET OF, field index */
30 int skidx;
31 /* ASN1 depth of field */
32 int depth;
33 /* Structure and field name */
34 const char *sname, *fname;
35 /* If a primitive type the type of underlying field */
36 int prim_type;
37 /* The field value itself */
38 ASN1_VALUE **field;
39 /* Callback to pass information to */
40 int (*scan_cb) (ASN1_SCTX *ctx);
41 /* Context specific application data */
42 void *app_data;
43} /* ASN1_SCTX */ ;
44
45typedef struct mime_param_st MIME_PARAM;
46DEFINE_STACK_OF(MIME_PARAM)
47typedef struct mime_header_st MIME_HEADER;
48DEFINE_STACK_OF(MIME_HEADER)
49
50void ossl_asn1_string_embed_free(ASN1_STRING *a, int embed);
51
52int ossl_asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it);
53int ossl_asn1_get_choice_selector_const(const ASN1_VALUE **pval,
54 const ASN1_ITEM *it);
55int ossl_asn1_set_choice_selector(ASN1_VALUE **pval, int value,
56 const ASN1_ITEM *it);
57
58ASN1_VALUE **ossl_asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
59const ASN1_VALUE **ossl_asn1_get_const_field_ptr(const ASN1_VALUE **pval,
60 const ASN1_TEMPLATE *tt);
61
62const ASN1_TEMPLATE *ossl_asn1_do_adb(const ASN1_VALUE *val,
63 const ASN1_TEMPLATE *tt,
64 int nullerr);
65
66int ossl_asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it);
67
68void ossl_asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it);
69void ossl_asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
70int ossl_asn1_enc_restore(int *len, unsigned char **out, const ASN1_VALUE **pval,
71 const ASN1_ITEM *it);
72int ossl_asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,
73 const ASN1_ITEM *it);
74
75void ossl_asn1_item_embed_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed);
76void ossl_asn1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed);
77void ossl_asn1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
78
79ASN1_OBJECT *ossl_c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
80 long length);
81int ossl_i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);
82ASN1_BIT_STRING *ossl_c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,
83 const unsigned char **pp, long length);
84int ossl_i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);
85ASN1_INTEGER *ossl_c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,
86 long length);
87
88/* Internal functions used by x_int64.c */
89int ossl_c2i_uint64_int(uint64_t *ret, int *neg, const unsigned char **pp,
90 long len);
91int ossl_i2c_uint64_int(unsigned char *p, uint64_t r, int neg);
92
93ASN1_TIME *ossl_asn1_time_from_tm(ASN1_TIME *s, struct tm *ts, int type);
94
95int ossl_asn1_item_ex_new_intern(ASN1_VALUE **pval, const ASN1_ITEM *it,
96 OSSL_LIB_CTX *libctx, const char *propq);
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette