|
| SHARKSSL_API int | SharkSslPSAEcdsaKey_generate (SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_importPrivate (SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic, const U8 *privateKey, U16 privateKeyLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_importPublic (SharkSslPSAEcdsaKey *o, U16 curveID, psa_algorithm_t hashAlg, int deterministic, const U8 *publicKey, U16 publicKeyLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_exportPublic (const SharkSslPSAEcdsaKey *o, U8 *publicKey, U16 publicKeySize, U16 *publicKeyLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_signRaw (const SharkSslPSAEcdsaKey *o, const U8 *hash, U16 hashLen, U8 *signature, U16 signatureSize, U16 *signatureLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_verifyRaw (const SharkSslPSAEcdsaKey *o, const U8 *hash, U16 hashLen, const U8 *signature, U16 signatureLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsa_rawToDer (U16 curveID, const U8 *raw, U16 rawLen, U8 *der, U16 derSize, U16 *derLen) |
| |
| SHARKSSL_API int | SharkSslPSAEcdsa_derToRaw (U16 curveID, const U8 *der, U16 derLen, U8 *raw, U16 rawSize, U16 *rawLen) |
| |
| SHARKSSL_API int | SharkSslASN1Create_CSRWithPSAECDSAKey (struct SharkSslASN1Create *o, const SharkSslPSAEcdsaKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType) |
| | Create a PKCS#10 CSR using a private P-256, P-384, or P-521 PSA handle The handle must permit ECDSA signing with SHA-256, SHA-384, or SHA-512. More...
|
| |
| SHARKSSL_API int | SharkSslASN1Create_CSRWithPSAECDSAKeyHash (struct SharkSslASN1Create *o, const SharkSslPSAEcdsaKey *key, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType, U8 hashID) |
| | Select a concrete digest when the signing key permits ECDSA(ANY_HASH). More...
|
| |
| SHARKSSL_API int | SharkSslPSAEcdsaKey_destructor (SharkSslPSAEcdsaKey *o) |
| |
See Choose a SharkSSL API for build scope and the owning API layer.
Create a PKCS#10 CSR using a private P-256, P-384, or P-521 PSA handle The handle must permit ECDSA signing with SHA-256, SHA-384, or SHA-512.
This creates a request, not an issued certificate.
Inputs and the private key remain owned by the caller. Supported CSR curves are P-256, P-384, and P-521. The non-Hash form derives the hash from the key algorithm; ANY_HASH requires the Hash form.
- Parameters
-
| o | SharkSslASN1Create *; required freshly initialized writer with an empty caller-owned buffer (ptr=end). Retrieve the resulting DER with SharkSslASN1Create_getDataLen. |
| key | const SharkSslPSAEcdsaKey *; required live private signing-key context, borrowed for the call; public-only keys are rejected. |
| certDN | SharkSslCertDN *; required subject distinguished name, borrowed for the call. |
| SAN | const char *; optional NUL-terminated SAN string using SharkSslASN1Create_CSR syntax; NULL omits this extension. |
| keyUsage | SharkSslBitExtReq *; optional requested key-usage extension, or NULL. |
| nsCertType | SharkSslBitExtReq *; optional Netscape certificate-type extension, or NULL. |
- Returns
- int: 0 on success; nonzero on invalid input, insufficient writer space, allocation/signing failure, or unsupported key/hash. Discard the writer output after failure.
Select a concrete digest when the signing key permits ECDSA(ANY_HASH).
This creates a request, not an issued certificate.
The key must allow SIGN_HASH for the selected digest; ANY_HASH is never passed as an operation algorithm.
Inputs and the private key remain owned by the caller. Supported CSR curves are P-256, P-384, and P-521. The non-Hash form derives the hash from the key algorithm; ANY_HASH requires the Hash form.
- Parameters
-
| o | SharkSslASN1Create *; required freshly initialized writer with an empty caller-owned buffer (ptr=end). Retrieve the resulting DER with SharkSslASN1Create_getDataLen. |
| key | const SharkSslPSAEcdsaKey *; required live private signing-key context, borrowed for the call; public-only keys are rejected. |
| certDN | SharkSslCertDN *; required subject distinguished name, borrowed for the call. |
| SAN | const char *; optional NUL-terminated SAN string using SharkSslASN1Create_CSR syntax; NULL omits this extension. |
| keyUsage | SharkSslBitExtReq *; optional requested key-usage extension, or NULL. |
| nsCertType | SharkSslBitExtReq *; optional Netscape certificate-type extension, or NULL. |
| hashID | U8; enabled SHARKSSL_HASHID_SHA256, SHARKSSL_HASHID_SHA384, or SHARKSSL_HASHID_SHA512 matching the key's ECDSA policy (or ANY_HASH). |
- Returns
- int: 0 on success; nonzero on invalid input, insufficient writer space, allocation/signing failure, or unsupported key/hash. Discard the writer output after failure.