diff options
| author | jsing <> | 2015-02-09 16:03:11 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-09 16:03:11 +0000 |
| commit | e8979e4da17f6d268e647d4e22aed16dad9f0666 (patch) | |
| tree | 450aac9231a21230a1a136407055b6264089d1b8 /src/lib/libcrypto/x509v3/v3_asid.c | |
| parent | 15dc63f9715f4f10924a705d6a4cc564afe2129e (diff) | |
| download | openbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.tar.gz openbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.tar.bz2 openbsd-e8979e4da17f6d268e647d4e22aed16dad9f0666.zip | |
Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible and
functions can be readily located.
Change has been scripted and the generated assembly only differs by changes
to line numbers.
Discussed with beck@ miod@ tedu@
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_asid.c')
| -rw-r--r-- | src/lib/libcrypto/x509v3/v3_asid.c | 106 |
1 files changed, 101 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_asid.c b/src/lib/libcrypto/x509v3/v3_asid.c index 680eed31ec..10f82c573d 100644 --- a/src/lib/libcrypto/x509v3/v3_asid.c +++ b/src/lib/libcrypto/x509v3/v3_asid.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: v3_asid.c,v 1.11 2014/07/13 16:03:10 beck Exp $ */ | 1 | /* $OpenBSD: v3_asid.c,v 1.12 2015/02/09 16:03:11 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
| 4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
| @@ -98,10 +98,106 @@ ASN1_SEQUENCE(ASIdentifiers) = { | |||
| 98 | ASN1_EXP_OPT(ASIdentifiers, rdi, ASIdentifierChoice, 1) | 98 | ASN1_EXP_OPT(ASIdentifiers, rdi, ASIdentifierChoice, 1) |
| 99 | } ASN1_SEQUENCE_END(ASIdentifiers) | 99 | } ASN1_SEQUENCE_END(ASIdentifiers) |
| 100 | 100 | ||
| 101 | IMPLEMENT_ASN1_FUNCTIONS(ASRange) | 101 | |
| 102 | IMPLEMENT_ASN1_FUNCTIONS(ASIdOrRange) | 102 | ASRange * |
| 103 | IMPLEMENT_ASN1_FUNCTIONS(ASIdentifierChoice) | 103 | d2i_ASRange(ASRange **a, const unsigned char **in, long len) |
| 104 | IMPLEMENT_ASN1_FUNCTIONS(ASIdentifiers) | 104 | { |
| 105 | return (ASRange *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 106 | &ASRange_it); | ||
| 107 | } | ||
| 108 | |||
| 109 | int | ||
| 110 | i2d_ASRange(ASRange *a, unsigned char **out) | ||
| 111 | { | ||
| 112 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASRange_it); | ||
| 113 | } | ||
| 114 | |||
| 115 | ASRange * | ||
| 116 | ASRange_new(void) | ||
| 117 | { | ||
| 118 | return (ASRange *)ASN1_item_new(&ASRange_it); | ||
| 119 | } | ||
| 120 | |||
| 121 | void | ||
| 122 | ASRange_free(ASRange *a) | ||
| 123 | { | ||
| 124 | ASN1_item_free((ASN1_VALUE *)a, &ASRange_it); | ||
| 125 | } | ||
| 126 | |||
| 127 | ASIdOrRange * | ||
| 128 | d2i_ASIdOrRange(ASIdOrRange **a, const unsigned char **in, long len) | ||
| 129 | { | ||
| 130 | return (ASIdOrRange *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 131 | &ASIdOrRange_it); | ||
| 132 | } | ||
| 133 | |||
| 134 | int | ||
| 135 | i2d_ASIdOrRange(ASIdOrRange *a, unsigned char **out) | ||
| 136 | { | ||
| 137 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdOrRange_it); | ||
| 138 | } | ||
| 139 | |||
| 140 | ASIdOrRange * | ||
| 141 | ASIdOrRange_new(void) | ||
| 142 | { | ||
| 143 | return (ASIdOrRange *)ASN1_item_new(&ASIdOrRange_it); | ||
| 144 | } | ||
| 145 | |||
| 146 | void | ||
| 147 | ASIdOrRange_free(ASIdOrRange *a) | ||
| 148 | { | ||
| 149 | ASN1_item_free((ASN1_VALUE *)a, &ASIdOrRange_it); | ||
| 150 | } | ||
| 151 | |||
| 152 | ASIdentifierChoice * | ||
| 153 | d2i_ASIdentifierChoice(ASIdentifierChoice **a, const unsigned char **in, long len) | ||
| 154 | { | ||
| 155 | return (ASIdentifierChoice *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 156 | &ASIdentifierChoice_it); | ||
| 157 | } | ||
| 158 | |||
| 159 | int | ||
| 160 | i2d_ASIdentifierChoice(ASIdentifierChoice *a, unsigned char **out) | ||
| 161 | { | ||
| 162 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdentifierChoice_it); | ||
| 163 | } | ||
| 164 | |||
| 165 | ASIdentifierChoice * | ||
| 166 | ASIdentifierChoice_new(void) | ||
| 167 | { | ||
| 168 | return (ASIdentifierChoice *)ASN1_item_new(&ASIdentifierChoice_it); | ||
| 169 | } | ||
| 170 | |||
| 171 | void | ||
| 172 | ASIdentifierChoice_free(ASIdentifierChoice *a) | ||
| 173 | { | ||
| 174 | ASN1_item_free((ASN1_VALUE *)a, &ASIdentifierChoice_it); | ||
| 175 | } | ||
| 176 | |||
| 177 | ASIdentifiers * | ||
| 178 | d2i_ASIdentifiers(ASIdentifiers **a, const unsigned char **in, long len) | ||
| 179 | { | ||
| 180 | return (ASIdentifiers *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 181 | &ASIdentifiers_it); | ||
| 182 | } | ||
| 183 | |||
| 184 | int | ||
| 185 | i2d_ASIdentifiers(ASIdentifiers *a, unsigned char **out) | ||
| 186 | { | ||
| 187 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASIdentifiers_it); | ||
| 188 | } | ||
| 189 | |||
| 190 | ASIdentifiers * | ||
| 191 | ASIdentifiers_new(void) | ||
| 192 | { | ||
| 193 | return (ASIdentifiers *)ASN1_item_new(&ASIdentifiers_it); | ||
| 194 | } | ||
| 195 | |||
| 196 | void | ||
| 197 | ASIdentifiers_free(ASIdentifiers *a) | ||
| 198 | { | ||
| 199 | ASN1_item_free((ASN1_VALUE *)a, &ASIdentifiers_it); | ||
| 200 | } | ||
| 105 | 201 | ||
| 106 | /* | 202 | /* |
| 107 | * i2r method for an ASIdentifierChoice. | 203 | * i2r method for an ASIdentifierChoice. |
