chaps_support.h 930 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CRYPTO_CHAPS_SUPPORT_H_
  5. #define CRYPTO_CHAPS_SUPPORT_H_
  6. #include <secmodt.h>
  7. #include "crypto/crypto_export.h"
  8. #include "crypto/scoped_nss_types.h"
  9. namespace crypto {
  10. // Loads chaps module for this NSS session. Should be called on a worker thread.
  11. CRYPTO_EXPORT SECMODModule* LoadChaps();
  12. // Returns a slot with `slot_id` from the `chaps_module`. Should be called on a
  13. // worker thread.
  14. CRYPTO_EXPORT ScopedPK11Slot GetChapsSlot(SECMODModule* chaps_module,
  15. CK_SLOT_ID slot_id);
  16. // Returns true if chaps is the module to which |slot| is attached. Should be
  17. // called on a worker thread.
  18. CRYPTO_EXPORT bool IsSlotProvidedByChaps(PK11SlotInfo* slot);
  19. } // namespace crypto
  20. #endif // CRYPTO_CHAPS_SUPPORT_H_