nss_sys/bindings/
seccomon.rs

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
5use std::os::raw::{c_uchar, c_uint};
6
7#[repr(u32)]
8pub enum SECItemType {
9    siBuffer = 0,
10    siClearDataBuffer = 1,
11    siCipherDataBuffer = 2,
12    siDERCertBuffer = 3,
13    siEncodedCertBuffer = 4,
14    siDERNameBuffer = 5,
15    siEncodedNameBuffer = 6,
16    siAsciiNameString = 7,
17    siAsciiString = 8,
18    siDEROID = 9,
19    siUnsignedInteger = 10,
20    siUTCTime = 11,
21    siGeneralizedTime = 12,
22    siVisibleString = 13,
23    siUTF8String = 14,
24    siBMPString = 15,
25}
26
27pub type SECItem = SECItemStr;
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct SECItemStr {
31    pub type_: u32, /* SECItemType */
32    pub data: *mut c_uchar,
33    pub len: c_uint,
34}
35
36#[repr(i32)]
37#[derive(PartialEq, Eq)]
38pub enum _SECStatus {
39    SECWouldBlock = -2,
40    SECFailure = -1,
41    SECSuccess = 0,
42}
43pub use _SECStatus as SECStatus;