nss_sys/bindings/
nss.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 crate::*;
6use std::os::raw::c_char;
7
8extern "C" {
9    pub fn NSS_VersionCheck(importedVersion: *const c_char) -> PRBool;
10    pub fn NSS_InitContext(
11        configdir: *const c_char,
12        certPrefix: *const c_char,
13        keyPrefix: *const c_char,
14        secmodName: *const c_char,
15        initParams: *mut NSSInitParameters,
16        flags: PRUint32,
17    ) -> *mut NSSInitContext;
18    pub fn NSS_IsInitialized() -> PRBool;
19}
20
21pub const NSS_INIT_READONLY: u32 = 1;
22pub const NSS_INIT_NOCERTDB: u32 = 2;
23pub const NSS_INIT_NOMODDB: u32 = 4;
24pub const NSS_INIT_FORCEOPEN: u32 = 8;
25pub const NSS_INIT_OPTIMIZESPACE: u32 = 32;
26
27// Opaque types
28pub type NSSInitContext = u8;
29pub type NSSInitParameters = [u64; 10usize];