/usr/include/heimdal/ocsp_asn1.h is in heimdal-multidev 1.6~git20131207+dfsg-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | /* Generated from ./ocsp.asn1 */
/* Do not edit */
#ifndef __ocsp_asn1_h__
#define __ocsp_asn1_h__
#include <stddef.h>
#include <time.h>
#ifndef __asn1_common_definitions__
#define __asn1_common_definitions__
#ifndef __HEIM_BASE_DATA__
#define __HEIM_BASE_DATA__ 1
struct heim_base_data {
size_t length;
void *data;
};
typedef struct heim_base_data heim_octet_string;
#endif
typedef struct heim_integer {
size_t length;
void *data;
int negative;
} heim_integer;
typedef char *heim_general_string;
typedef char *heim_utf8_string;
typedef struct heim_base_data heim_printable_string;
typedef struct heim_base_data heim_ia5_string;
typedef struct heim_bmp_string {
size_t length;
uint16_t *data;
} heim_bmp_string;
typedef struct heim_universal_string {
size_t length;
uint32_t *data;
} heim_universal_string;
typedef char *heim_visible_string;
typedef struct heim_oid {
size_t length;
unsigned *components;
} heim_oid;
typedef struct heim_bit_string {
size_t length;
void *data;
} heim_bit_string;
typedef struct heim_base_data heim_any;
typedef struct heim_base_data heim_any_set;
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \
do { \
(BL) = length_##T((S)); \
(B) = malloc((BL)); \
if((B) == NULL) { \
(R) = ENOMEM; \
} else { \
(R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \
(S), (L)); \
if((R) != 0) { \
free((B)); \
(B) = NULL; \
} \
} \
} while (0)
#ifdef _WIN32
#ifndef ASN1_LIB
#define ASN1EXP __declspec(dllimport)
#else
#define ASN1EXP
#endif
#define ASN1CALL __stdcall
#else
#define ASN1EXP
#define ASN1CALL
#endif
struct units;
#endif
#include <rfc2459_asn1.h>
/*
OCSPVersion ::= INTEGER {
ocsp_v1(0)
}
*/
typedef enum OCSPVersion {
ocsp_v1 = 0
} OCSPVersion;
ASN1EXP int ASN1CALL decode_OCSPVersion(const unsigned char *, size_t, OCSPVersion *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPVersion(unsigned char *, size_t, const OCSPVersion *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPVersion(const OCSPVersion *);
ASN1EXP int ASN1CALL copy_OCSPVersion (const OCSPVersion *, OCSPVersion *);
ASN1EXP void ASN1CALL free_OCSPVersion (OCSPVersion *);
/*
OCSPCertStatus ::= CHOICE {
good [0] IMPLICIT NULL,
revoked [1] IMPLICIT SEQUENCE {
revocationTime GeneralizedTime,
revocationReason [0] CRLReason OPTIONAL,
},
unknown [2] IMPLICIT NULL,
}
*/
typedef struct OCSPCertStatus {
enum OCSPCertStatus_enum {
choice_OCSPCertStatus_good = 1,
choice_OCSPCertStatus_revoked,
choice_OCSPCertStatus_unknown
} element;
union {
int good;
struct OCSPCertStatus_revoked {
time_t revocationTime;
CRLReason *revocationReason;
} revoked;
int unknown;
} u;
} OCSPCertStatus;
ASN1EXP int ASN1CALL decode_OCSPCertStatus(const unsigned char *, size_t, OCSPCertStatus *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPCertStatus(unsigned char *, size_t, const OCSPCertStatus *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPCertStatus(const OCSPCertStatus *);
ASN1EXP int ASN1CALL copy_OCSPCertStatus (const OCSPCertStatus *, OCSPCertStatus *);
ASN1EXP void ASN1CALL free_OCSPCertStatus (OCSPCertStatus *);
/*
OCSPCertID ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
issuerNameHash OCTET STRING,
issuerKeyHash OCTET STRING,
serialNumber CertificateSerialNumber,
}
*/
typedef struct OCSPCertID {
AlgorithmIdentifier hashAlgorithm;
heim_octet_string issuerNameHash;
heim_octet_string issuerKeyHash;
CertificateSerialNumber serialNumber;
} OCSPCertID;
ASN1EXP int ASN1CALL decode_OCSPCertID(const unsigned char *, size_t, OCSPCertID *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPCertID(unsigned char *, size_t, const OCSPCertID *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPCertID(const OCSPCertID *);
ASN1EXP int ASN1CALL copy_OCSPCertID (const OCSPCertID *, OCSPCertID *);
ASN1EXP void ASN1CALL free_OCSPCertID (OCSPCertID *);
/*
OCSPSingleResponse ::= SEQUENCE {
certID OCSPCertID,
certStatus OCSPCertStatus,
thisUpdate GeneralizedTime,
nextUpdate [0] GeneralizedTime OPTIONAL,
singleExtensions [1] Extensions OPTIONAL,
}
*/
typedef struct OCSPSingleResponse {
OCSPCertID certID;
OCSPCertStatus certStatus;
time_t thisUpdate;
time_t *nextUpdate;
Extensions *singleExtensions;
} OCSPSingleResponse;
ASN1EXP int ASN1CALL decode_OCSPSingleResponse(const unsigned char *, size_t, OCSPSingleResponse *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPSingleResponse(unsigned char *, size_t, const OCSPSingleResponse *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPSingleResponse(const OCSPSingleResponse *);
ASN1EXP int ASN1CALL copy_OCSPSingleResponse (const OCSPSingleResponse *, OCSPSingleResponse *);
ASN1EXP void ASN1CALL free_OCSPSingleResponse (OCSPSingleResponse *);
/*
OCSPInnerRequest ::= SEQUENCE {
reqCert OCSPCertID,
singleRequestExtensions [0] Extensions OPTIONAL,
}
*/
typedef struct OCSPInnerRequest {
OCSPCertID reqCert;
Extensions *singleRequestExtensions;
} OCSPInnerRequest;
ASN1EXP int ASN1CALL decode_OCSPInnerRequest(const unsigned char *, size_t, OCSPInnerRequest *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPInnerRequest(unsigned char *, size_t, const OCSPInnerRequest *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPInnerRequest(const OCSPInnerRequest *);
ASN1EXP int ASN1CALL copy_OCSPInnerRequest (const OCSPInnerRequest *, OCSPInnerRequest *);
ASN1EXP void ASN1CALL free_OCSPInnerRequest (OCSPInnerRequest *);
/*
OCSPTBSRequest ::= SEQUENCE {
version [0] OCSPVersion OPTIONAL,
requestorName [1] GeneralName OPTIONAL,
requestList SEQUENCE OF OCSPInnerRequest,
requestExtensions [2] Extensions OPTIONAL,
}
*/
typedef struct OCSPTBSRequest {
heim_octet_string _save;
OCSPVersion *version;
GeneralName *requestorName;
struct OCSPTBSRequest_requestList {
unsigned int len;
OCSPInnerRequest *val;
} requestList;
Extensions *requestExtensions;
} OCSPTBSRequest;
ASN1EXP int ASN1CALL decode_OCSPTBSRequest(const unsigned char *, size_t, OCSPTBSRequest *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPTBSRequest(unsigned char *, size_t, const OCSPTBSRequest *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPTBSRequest(const OCSPTBSRequest *);
ASN1EXP int ASN1CALL copy_OCSPTBSRequest (const OCSPTBSRequest *, OCSPTBSRequest *);
ASN1EXP void ASN1CALL free_OCSPTBSRequest (OCSPTBSRequest *);
/*
OCSPSignature ::= SEQUENCE {
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING {
},
certs [0] SEQUENCE OF Certificate OPTIONAL,
}
*/
typedef struct OCSPSignature {
AlgorithmIdentifier signatureAlgorithm;
heim_bit_string signature;
struct OCSPSignature_certs {
unsigned int len;
Certificate *val;
} *certs;
} OCSPSignature;
ASN1EXP int ASN1CALL decode_OCSPSignature(const unsigned char *, size_t, OCSPSignature *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPSignature(unsigned char *, size_t, const OCSPSignature *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPSignature(const OCSPSignature *);
ASN1EXP int ASN1CALL copy_OCSPSignature (const OCSPSignature *, OCSPSignature *);
ASN1EXP void ASN1CALL free_OCSPSignature (OCSPSignature *);
/*
OCSPRequest ::= SEQUENCE {
tbsRequest OCSPTBSRequest,
optionalSignature [0] OCSPSignature OPTIONAL,
}
*/
typedef struct OCSPRequest {
OCSPTBSRequest tbsRequest;
OCSPSignature *optionalSignature;
} OCSPRequest;
ASN1EXP int ASN1CALL decode_OCSPRequest(const unsigned char *, size_t, OCSPRequest *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPRequest(unsigned char *, size_t, const OCSPRequest *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPRequest(const OCSPRequest *);
ASN1EXP int ASN1CALL copy_OCSPRequest (const OCSPRequest *, OCSPRequest *);
ASN1EXP void ASN1CALL free_OCSPRequest (OCSPRequest *);
/*
OCSPResponseBytes ::= SEQUENCE {
responseType OBJECT IDENTIFIER,
response OCTET STRING,
}
*/
typedef struct OCSPResponseBytes {
heim_oid responseType;
heim_octet_string response;
} OCSPResponseBytes;
ASN1EXP int ASN1CALL decode_OCSPResponseBytes(const unsigned char *, size_t, OCSPResponseBytes *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPResponseBytes(unsigned char *, size_t, const OCSPResponseBytes *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPResponseBytes(const OCSPResponseBytes *);
ASN1EXP int ASN1CALL copy_OCSPResponseBytes (const OCSPResponseBytes *, OCSPResponseBytes *);
ASN1EXP void ASN1CALL free_OCSPResponseBytes (OCSPResponseBytes *);
/*
OCSPResponseStatus ::= INTEGER {
successful(0),
malformedRequest(1),
internalError(2),
tryLater(3),
sigRequired(5),
unauthorized(6)
}
*/
typedef enum OCSPResponseStatus {
successful = 0,
malformedRequest = 1,
internalError = 2,
tryLater = 3,
sigRequired = 5,
unauthorized = 6
} OCSPResponseStatus;
ASN1EXP int ASN1CALL decode_OCSPResponseStatus(const unsigned char *, size_t, OCSPResponseStatus *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPResponseStatus(unsigned char *, size_t, const OCSPResponseStatus *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPResponseStatus(const OCSPResponseStatus *);
ASN1EXP int ASN1CALL copy_OCSPResponseStatus (const OCSPResponseStatus *, OCSPResponseStatus *);
ASN1EXP void ASN1CALL free_OCSPResponseStatus (OCSPResponseStatus *);
/*
OCSPResponse ::= SEQUENCE {
responseStatus OCSPResponseStatus,
responseBytes [0] OCSPResponseBytes OPTIONAL,
}
*/
typedef struct OCSPResponse {
OCSPResponseStatus responseStatus;
OCSPResponseBytes *responseBytes;
} OCSPResponse;
ASN1EXP int ASN1CALL decode_OCSPResponse(const unsigned char *, size_t, OCSPResponse *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPResponse(unsigned char *, size_t, const OCSPResponse *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPResponse(const OCSPResponse *);
ASN1EXP int ASN1CALL copy_OCSPResponse (const OCSPResponse *, OCSPResponse *);
ASN1EXP void ASN1CALL free_OCSPResponse (OCSPResponse *);
/*
OCSPKeyHash ::= OCTET STRING
*/
typedef heim_octet_string OCSPKeyHash;
ASN1EXP int ASN1CALL decode_OCSPKeyHash(const unsigned char *, size_t, OCSPKeyHash *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPKeyHash(unsigned char *, size_t, const OCSPKeyHash *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPKeyHash(const OCSPKeyHash *);
ASN1EXP int ASN1CALL copy_OCSPKeyHash (const OCSPKeyHash *, OCSPKeyHash *);
ASN1EXP void ASN1CALL free_OCSPKeyHash (OCSPKeyHash *);
/*
OCSPResponderID ::= CHOICE {
byName [1] Name,
byKey [2] OCSPKeyHash,
}
*/
typedef struct OCSPResponderID {
enum OCSPResponderID_enum {
choice_OCSPResponderID_byName = 1,
choice_OCSPResponderID_byKey
} element;
union {
Name byName;
OCSPKeyHash byKey;
} u;
} OCSPResponderID;
ASN1EXP int ASN1CALL decode_OCSPResponderID(const unsigned char *, size_t, OCSPResponderID *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPResponderID(unsigned char *, size_t, const OCSPResponderID *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPResponderID(const OCSPResponderID *);
ASN1EXP int ASN1CALL copy_OCSPResponderID (const OCSPResponderID *, OCSPResponderID *);
ASN1EXP void ASN1CALL free_OCSPResponderID (OCSPResponderID *);
/*
OCSPResponseData ::= SEQUENCE {
version [0] OCSPVersion OPTIONAL,
responderID OCSPResponderID,
producedAt GeneralizedTime,
responses SEQUENCE OF OCSPSingleResponse,
responseExtensions [1] Extensions OPTIONAL,
}
*/
typedef struct OCSPResponseData {
heim_octet_string _save;
OCSPVersion *version;
OCSPResponderID responderID;
time_t producedAt;
struct OCSPResponseData_responses {
unsigned int len;
OCSPSingleResponse *val;
} responses;
Extensions *responseExtensions;
} OCSPResponseData;
ASN1EXP int ASN1CALL decode_OCSPResponseData(const unsigned char *, size_t, OCSPResponseData *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPResponseData(unsigned char *, size_t, const OCSPResponseData *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPResponseData(const OCSPResponseData *);
ASN1EXP int ASN1CALL copy_OCSPResponseData (const OCSPResponseData *, OCSPResponseData *);
ASN1EXP void ASN1CALL free_OCSPResponseData (OCSPResponseData *);
/*
OCSPBasicOCSPResponse ::= SEQUENCE {
tbsResponseData OCSPResponseData,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING {
},
certs [0] SEQUENCE OF Certificate OPTIONAL,
}
*/
typedef struct OCSPBasicOCSPResponse {
OCSPResponseData tbsResponseData;
AlgorithmIdentifier signatureAlgorithm;
heim_bit_string signature;
struct OCSPBasicOCSPResponse_certs {
unsigned int len;
Certificate *val;
} *certs;
} OCSPBasicOCSPResponse;
ASN1EXP int ASN1CALL decode_OCSPBasicOCSPResponse(const unsigned char *, size_t, OCSPBasicOCSPResponse *, size_t *);
ASN1EXP int ASN1CALL encode_OCSPBasicOCSPResponse(unsigned char *, size_t, const OCSPBasicOCSPResponse *, size_t *);
ASN1EXP size_t ASN1CALL length_OCSPBasicOCSPResponse(const OCSPBasicOCSPResponse *);
ASN1EXP int ASN1CALL copy_OCSPBasicOCSPResponse (const OCSPBasicOCSPResponse *, OCSPBasicOCSPResponse *);
ASN1EXP void ASN1CALL free_OCSPBasicOCSPResponse (OCSPBasicOCSPResponse *);
/* OBJECT IDENTIFIER id-pkix-ocsp ::= { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) pkix-ad(48) label-less(1) } */
extern ASN1EXP const heim_oid asn1_oid_id_pkix_ocsp;
#define ASN1_OID_ID_PKIX_OCSP (&asn1_oid_id_pkix_ocsp)
/* OBJECT IDENTIFIER id-pkix-ocsp-basic ::= { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) pkix-ad(48) label-less(1) label-less(1) } */
extern ASN1EXP const heim_oid asn1_oid_id_pkix_ocsp_basic;
#define ASN1_OID_ID_PKIX_OCSP_BASIC (&asn1_oid_id_pkix_ocsp_basic)
/* OBJECT IDENTIFIER id-pkix-ocsp-nonce ::= { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) pkix-ad(48) label-less(1) label-less(2) } */
extern ASN1EXP const heim_oid asn1_oid_id_pkix_ocsp_nonce;
#define ASN1_OID_ID_PKIX_OCSP_NONCE (&asn1_oid_id_pkix_ocsp_nonce)
#endif /* __ocsp_asn1_h__ */
|