#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "crypto/nss_key_util.h"
#include <cryptohi.h>
#include <keyhi.h>
#include <pk11pub.h>
#include <secmod.h>
#include <stdint.h>
#include <memory>
#include <vector>
#include "base/logging.h"
#include "crypto/nss_util.h"
#include "crypto/nss_util_internal.h"
namespace crypto {
crypto::ScopedSECItem MakeNssIdFromPublicKey(SECKEYPublicKey* public_key) { … }
ScopedSECItem MakeNssIdFromSpki(base::span<const uint8_t> input) { … }
bool GenerateRSAKeyPairNSS(PK11SlotInfo* slot,
uint16_t num_bits,
bool permanent,
ScopedSECKEYPublicKey* public_key,
ScopedSECKEYPrivateKey* private_key) { … }
bool GenerateECKeyPairNSS(PK11SlotInfo* slot,
const SECOidTag named_curve,
bool permanent,
ScopedSECKEYPublicKey* public_key,
ScopedSECKEYPrivateKey* private_key) { … }
ScopedSECKEYPrivateKey ImportNSSKeyFromPrivateKeyInfo(
PK11SlotInfo* slot,
base::span<const uint8_t> input,
bool permanent) { … }
ScopedSECKEYPrivateKey FindNSSKeyFromPublicKeyInfo(
base::span<const uint8_t> input) { … }
ScopedSECKEYPrivateKey FindNSSKeyFromPublicKeyInfoInSlot(
base::span<const uint8_t> input,
PK11SlotInfo* slot) { … }
ScopedCERTSubjectPublicKeyInfo DecodeSubjectPublicKeyInfoNSS(
base::span<const uint8_t> input) { … }
}