Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: nss/lib/util/seccomon.h

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nss/lib/util/secasn1u.c ('k') | nss/lib/util/secder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 /*
6 * seccomon.h - common data structures for security libraries
7 *
8 * This file should have lowest-common-denominator datastructures
9 * for security libraries. It should not be dependent on any other
10 * headers, and should not require linking with any libraries.
11 */
12
13 #ifndef _SECCOMMON_H_
14 #define _SECCOMMON_H_
15
16 #include "utilrename.h"
17 #include "prtypes.h"
18
19
20 #ifdef __cplusplus
21 # define SEC_BEGIN_PROTOS extern "C" {
22 # define SEC_END_PROTOS }
23 #else
24 # define SEC_BEGIN_PROTOS
25 # define SEC_END_PROTOS
26 #endif
27
28 #include "secport.h"
29
30 typedef enum {
31 siBuffer = 0,
32 siClearDataBuffer = 1,
33 siCipherDataBuffer = 2,
34 siDERCertBuffer = 3,
35 siEncodedCertBuffer = 4,
36 siDERNameBuffer = 5,
37 siEncodedNameBuffer = 6,
38 siAsciiNameString = 7,
39 siAsciiString = 8,
40 siDEROID = 9,
41 siUnsignedInteger = 10,
42 siUTCTime = 11,
43 siGeneralizedTime = 12,
44 siVisibleString = 13,
45 siUTF8String = 14,
46 siBMPString = 15
47 } SECItemType;
48
49 typedef struct SECItemStr SECItem;
50
51 struct SECItemStr {
52 SECItemType type;
53 unsigned char *data;
54 unsigned int len;
55 };
56
57 typedef struct SECItemArrayStr SECItemArray;
58
59 struct SECItemArrayStr {
60 SECItem *items;
61 unsigned int len;
62 };
63
64 /*
65 ** A status code. Status's are used by procedures that return status
66 ** values. Again the motivation is so that a compiler can generate
67 ** warnings when return values are wrong. Correct testing of status codes:
68 **
69 ** SECStatus rv;
70 ** rv = some_function (some_argument);
71 ** if (rv != SECSuccess)
72 ** do_an_error_thing();
73 **
74 */
75 typedef enum _SECStatus {
76 SECWouldBlock = -2,
77 SECFailure = -1,
78 SECSuccess = 0
79 } SECStatus;
80
81 /*
82 ** A comparison code. Used for procedures that return comparision
83 ** values. Again the motivation is so that a compiler can generate
84 ** warnings when return values are wrong.
85 */
86 typedef enum _SECComparison {
87 SECLessThan = -1,
88 SECEqual = 0,
89 SECGreaterThan = 1
90 } SECComparison;
91
92 #endif /* _SECCOMMON_H_ */
OLDNEW
« no previous file with comments | « nss/lib/util/secasn1u.c ('k') | nss/lib/util/secder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698