1 // Copyright 2020 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CRYPTO_CHAPS_SUPPORT_H_
6 #define CRYPTO_CHAPS_SUPPORT_H_
10 #include "crypto/crypto_export.h"
11 #include "crypto/scoped_nss_types.h"
15 // Loads chaps module for this NSS session. Should be called on a worker thread.
16 CRYPTO_EXPORT SECMODModule* LoadChaps();
18 // Returns a slot with `slot_id` from the `chaps_module`. Should be called on a
20 CRYPTO_EXPORT ScopedPK11Slot GetChapsSlot(SECMODModule* chaps_module,
23 // Returns true if the given module is the Chaps module. Should be called on a
25 CRYPTO_EXPORT bool IsChapsModule(SECMODModule* pk11_module);
27 // Returns true if chaps is the module to which |slot| is attached. Should be
28 // called on a worker thread.
29 CRYPTO_EXPORT bool IsSlotProvidedByChaps(PK11SlotInfo* slot);
33 #endif // CRYPTO_CHAPS_SUPPORT_H_