diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /third_party/rust/ohttp/bindings | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/ohttp/bindings')
-rw-r--r-- | third_party/rust/ohttp/bindings/bindings.toml | 130 | ||||
-rw-r--r-- | third_party/rust/ohttp/bindings/nspr_err.h | 7 | ||||
-rw-r--r-- | third_party/rust/ohttp/bindings/nspr_error.h | 7 | ||||
-rw-r--r-- | third_party/rust/ohttp/bindings/nss_init.h | 7 | ||||
-rw-r--r-- | third_party/rust/ohttp/bindings/nss_p11.h | 10 | ||||
-rw-r--r-- | third_party/rust/ohttp/bindings/nss_secerr.h | 7 |
6 files changed, 168 insertions, 0 deletions
diff --git a/third_party/rust/ohttp/bindings/bindings.toml b/third_party/rust/ohttp/bindings/bindings.toml new file mode 100644 index 0000000000..3f4a4262b3 --- /dev/null +++ b/third_party/rust/ohttp/bindings/bindings.toml @@ -0,0 +1,130 @@ +# In this file, every section corresponds to a header file. +# A corresponding binding file will be created in $OUT_DIR. + +[nspr_err] +# NSPR doesn't use an enum for errors, so we have to pull in everything in the header file. +# Specifying no types, functions, or variables does that, but then exclude some. +exclude = [ + "nspr_.*", + "PR_MAX_ERROR", + "ERROR_TABLE_BASE_nspr" +] + +[nspr_error] +functions = [ + "PR_ErrorToName", + "PR_ErrorToString", + "PR_GetError", + "PR_SetError", +] +variables = [ + "PR_LANGUAGE_I_DEFAULT", +] + +[nss_secerr] +types = ["SECErrorCodes"] +enums = ["SECErrorCodes"] + +[nss_init] +functions = [ + "NSS_IsInitialized", + "NSS_NoDB_Init", + "NSS_Shutdown", +] + +[nss_p11] +types = [ + "CK_ATTRIBUTE_TYPE", + "CK_BBOOL", + "CK_FLAGS", + "CK_GENERATOR_FUNCTION", + "CK_HKDF_PARAMS", + "CK_MECHANISM_TYPE", + "CK_OBJECT_HANDLE", + "CK_ULONG", + "SECItem", + "SECItemArray", + "SECOidData", +] +functions = [ + "PK11_AEADOp", + "PK11_CreateContextBySymKey", + "PK11_Derive", + "PK11_DestroyContext", + "PK11_Encrypt", + "PK11_ExtractKeyValue", + "PK11_FreeSlot", + "PK11_FreeSymKey", + "PK11_GenerateKeyPairWithOpFlags", + "PK11_GenerateRandom", + "PK11_GetBlockSize", + "PK11_GetInternalSlot", + "PK11_GetKeyData", + "PK11_GetMechanism", + "PK11_HPKE_Deserialize", + "PK11_HPKE_DestroyContext", + "PK11_HPKE_ExportSecret", + "PK11_HPKE_GetEncapPubKey", + "PK11_HPKE_NewContext", + "PK11_HPKE_Open", + "PK11_HPKE_Seal", + "PK11_HPKE_Serialize", + "PK11_HPKE_SetupR", + "PK11_HPKE_SetupS", + "PK11_HPKE_ValidateParameters", + "PK11_ImportSymKey", + "PK11_ReadRawAttribute", + "PK11_ReferenceSymKey", + "SECITEM_FreeItem", + "SECKEY_CopyPrivateKey", + "SECKEY_CopyPublicKey", + "SECKEY_DestroyPrivateKey", + "SECKEY_DestroyPublicKey", + "SECOID_FindOIDByTag", +] +enums = [ + "HpkeAeadId", + "HpkeKdfId", + "HpkeKemId", + "PK11ObjectType", + "PK11Origin", + "SECItemType", + "SECOidTag", +] +opaque = [ + "HpkeContext", + "PK11Context", + "PK11SlotInfo", + "PK11SymKey", + "SECKEYPrivateKey", + "SECKEYPublicKey", +] +variables = [ + "CK_INVALID_HANDLE", + "CKA_DECRYPT", + "CKA_DERIVE", + "CKA_ENCRYPT", + "CKA_NSS_MESSAGE", + "CKA_SIGN", + "CKA_VALUE", + "CKF_HKDF_SALT_DATA", + "CKF_HKDF_SALT_NULL", + "CKF_DERIVE", + "CKG_GENERATE_COUNTER_XOR", + "CKG_NO_GENERATE", + "CKM_AES_GCM", + "CKM_CHACHA20_POLY1305", + "CKM_EC_KEY_PAIR_GEN", + "CKM_HKDF_DATA", + "CKM_HKDF_DERIVE", + "CKM_HKDF_KEY_GEN", + "CKM_INVALID_MECHANISM", + "CKM_SHA256", + "HPKE_DRAFT_VERSION", + "PK11_ATTR_INSENSITIVE", + "PK11_ATTR_PRIVATE", + "PK11_ATTR_PUBLIC", + "PK11_ATTR_SENSITIVE", + "PK11_ATTR_SESSION", + "SEC_ASN1_OBJECT_ID", +] diff --git a/third_party/rust/ohttp/bindings/nspr_err.h b/third_party/rust/ohttp/bindings/nspr_err.h new file mode 100644 index 0000000000..204e771c49 --- /dev/null +++ b/third_party/rust/ohttp/bindings/nspr_err.h @@ -0,0 +1,7 @@ +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#include "prerr.h" diff --git a/third_party/rust/ohttp/bindings/nspr_error.h b/third_party/rust/ohttp/bindings/nspr_error.h new file mode 100644 index 0000000000..8ff8ce202d --- /dev/null +++ b/third_party/rust/ohttp/bindings/nspr_error.h @@ -0,0 +1,7 @@ +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#include "prerror.h" diff --git a/third_party/rust/ohttp/bindings/nss_init.h b/third_party/rust/ohttp/bindings/nss_init.h new file mode 100644 index 0000000000..a4beb38f69 --- /dev/null +++ b/third_party/rust/ohttp/bindings/nss_init.h @@ -0,0 +1,7 @@ +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#include "nss.h" diff --git a/third_party/rust/ohttp/bindings/nss_p11.h b/third_party/rust/ohttp/bindings/nss_p11.h new file mode 100644 index 0000000000..237e620445 --- /dev/null +++ b/third_party/rust/ohttp/bindings/nss_p11.h @@ -0,0 +1,10 @@ +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#define NSS_ENABLE_DRAFT_HPKE +#include "secoidt.h" +#include "keyhi.h" +#include "pk11pub.h" diff --git a/third_party/rust/ohttp/bindings/nss_secerr.h b/third_party/rust/ohttp/bindings/nss_secerr.h new file mode 100644 index 0000000000..c2b2d4020c --- /dev/null +++ b/third_party/rust/ohttp/bindings/nss_secerr.h @@ -0,0 +1,7 @@ +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#include "secerr.h" |