|
| #define | SHARKDBG_PRINTF(x) |
| |
| #define | SHARKSSL_BA 1 |
| |
| #define | SHARKSSL_ALERT_LEVEL_WARNING 1 |
| | SSL/TLS warning message. More...
|
| |
| #define | SHARKSSL_ALERT_LEVEL_FATAL 2 |
| | Fatal error message. More...
|
| |
| #define | SHARKSSL_ALERT_CLOSE_NOTIFY 0 |
| | SHARKSSL_ALERT_CLOSE_NOTIFY. More...
|
| |
| #define | SHARKSSL_ALERT_UNEXPECTED_MESSAGE 10 |
| | SHARKSSL_ALERT_UNEXPECTED_MESSAGE. More...
|
| |
| #define | SHARKSSL_ALERT_BAD_RECORD_MAC 20 |
| | SHARKSSL_ALERT_BAD_RECORD_MAC. More...
|
| |
| #define | SHARKSSL_ALERT_DECRYPTION_FAILED 21 |
| | SHARKSSL_ALERT_DECRYPTION_FAILED. More...
|
| |
| #define | SHARKSSL_ALERT_RECORD_OVERFLOW 22 |
| | SHARKSSL_ALERT_RECORD_OVERFLOW. More...
|
| |
| #define | SHARKSSL_ALERT_DECOMPRESSION_FAILURE 30 |
| | SHARKSSL_ALERT_DECOMPRESSION_FAILURE. More...
|
| |
| #define | SHARKSSL_ALERT_HANDSHAKE_FAILURE 40 |
| | SHARKSSL_ALERT_HANDSHAKE_FAILURE. More...
|
| |
| #define | SHARKSSL_ALERT_BAD_CERTIFICATE 42 |
| | SHARKSSL_ALERT_BAD_CERTIFICATE. More...
|
| |
| #define | SHARKSSL_ALERT_UNSUPPORTED_CERTIFICATE 43 |
| | SHARKSSL_ALERT_UNSUPPORTED_CERTIFICATE. More...
|
| |
| #define | SHARKSSL_ALERT_CERTIFICATE_REVOKED 44 |
| | SHARKSSL_ALERT_CERTIFICATE_REVOKED. More...
|
| |
| #define | SHARKSSL_ALERT_CERTIFICATE_EXPIRED 45 |
| | SHARKSSL_ALERT_CERTIFICATE_EXPIRED. More...
|
| |
| #define | SHARKSSL_ALERT_CERTIFICATE_UNKNOWN 46 |
| | SHARKSSL_ALERT_CERTIFICATE_UNKNOWN. More...
|
| |
| #define | SHARKSSL_ALERT_ILLEGAL_PARAMETER 47 |
| | SHARKSSL_ALERT_ILLEGAL_PARAMETER. More...
|
| |
| #define | SHARKSSL_ALERT_UNKNOWN_CA 48 |
| | SHARKSSL_ALERT_UNKNOWN_CA. More...
|
| |
| #define | SHARKSSL_ALERT_ACCESS_DENIED 49 |
| | SHARKSSL_ALERT_ACCESS_DENIED. More...
|
| |
| #define | SHARKSSL_ALERT_DECODE_ERROR 50 |
| | SHARKSSL_ALERT_DECODE_ERROR. More...
|
| |
| #define | SHARKSSL_ALERT_DECRYPT_ERROR 51 |
| | SHARKSSL_ALERT_DECRYPT_ERROR. More...
|
| |
| #define | SHARKSSL_ALERT_EXPORT_RESTRICTION 60 |
| | SHARKSSL_ALERT_EXPORT_RESTRICTION. More...
|
| |
| #define | SHARKSSL_ALERT_PROTOCOL_VERSION 70 |
| | SHARKSSL_ALERT_PROTOCOL_VERSION. More...
|
| |
| #define | SHARKSSL_ALERT_INSUFFICIENT_SECURITY 71 |
| | SHARKSSL_ALERT_INSUFFICIENT_SECURITY. More...
|
| |
| #define | SHARKSSL_ALERT_INTERNAL_ERROR 80 |
| | SHARKSSL_ALERT_INTERNAL_ERROR. More...
|
| |
| #define | SHARKSSL_ALERT_USER_CANCELED 90 |
| | SHARKSSL_ALERT_USER_CANCELED. More...
|
| |
| #define | SHARKSSL_ALERT_NO_RENEGOTIATION 100 |
| | SHARKSSL_ALERT_NO_RENEGOTIATION. More...
|
| |
| #define | SHARKSSL_ALERT_MISSING_EXTENSION 109 |
| | SHARKSSL_ALERT_MISSING_EXTENSION. More...
|
| |
| #define | SHARKSSL_ALERT_UNSUPPORTED_EXTENSION 110 |
| | SHARKSSL_ALERT_UNSUPPORTED_EXTENSION. More...
|
| |
| #define | SHARKSSL_ALERT_UNRECOGNIZED_NAME 112 |
| | SHARKSSL_ALERT_UNRECOGNIZED_NAME. More...
|
| |
| #define | SHARKSSL_ALERT_GENERAL_ERROR 117 |
| | SHARKSSL_ALERT_GENERAL_ERROR. More...
|
| |
| #define | SHARKSSL_ALERT_NO_APPLICATION_PROTOCOL 120 /* RFC 7301 */ |
| | SHARKSSL_ALERT_NO_APPLICATION_PROTOCOL. More...
|
| |
| #define | TLS_AES_128_GCM_SHA256 0x1301 |
| | TLS_AES_128_GCM_SHA256. More...
|
| |
| #define | TLS_AES_256_GCM_SHA384 0x1302 |
| | TLS_AES_256_GCM_SHA384. More...
|
| |
| #define | TLS_CHACHA20_POLY1305_SHA256 0x1303 |
| | TLS_CHACHA20_POLY1305_SHA256. More...
|
| |
| #define | TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x009E |
| | TLS_DHE_RSA_WITH_AES_128_GCM_SHA256. More...
|
| |
| #define | TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x009F |
| | TLS_DHE_RSA_WITH_AES_256_GCM_SHA384. More...
|
| |
| #define | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B |
| | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. More...
|
| |
| #define | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C |
| | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384. More...
|
| |
| #define | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F |
| | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. More...
|
| |
| #define | TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xC030 |
| | TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384. More...
|
| |
| #define | TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA8 |
| | TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256. More...
|
| |
| #define | TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0xCCA9 |
| | TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256. More...
|
| |
| #define | TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0xCCAA |
| | TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256. More...
|
| |
| #define | SHARKSSL_PROTOCOL_UNKNOWN 0x00 |
| | SHARKSSL_PROTOCOL_UNKNOWN. More...
|
| |
| #define | SHARKSSL_PROTOCOL_TLS_1_2 0x33 |
| | SHARKSSL_PROTOCOL_TLS_1_2. More...
|
| |
| #define | SHARKSSL_PROTOCOL_TLS_1_3 0x34 |
| | SHARKSSL_PROTOCOL_TLS_1_3. More...
|
| |
| #define | SHARKSSL_PROTOCOL_MAJOR(p) (p >> 4) |
| |
| #define | SHARKSSL_PROTOCOL_MINOR(p) (p & 0xF) |
| |
| #define | SharkSslCertDN_constructor(o) memset(o,0,sizeof(SharkSslCertDN)) |
| | SharkSslCertDN constructor. More...
|
| |
| #define | SharkSslCertDN_setCountryName(o, countryNameMA) (o)->countryName=(const U8*)countryNameMA,(o)->countryNameLen=(U8)strlen(countryNameMA) |
| | setCountryName More...
|
| |
| #define | SharkSslCertDN_setProvince(o, provinceMA) (o)->province=(const U8*)provinceMA,(o)->provinceLen=(U8)strlen(provinceMA) |
| | setProvince More...
|
| |
| #define | SharkSslCertDN_setLocality(o, localityMA) (o)->locality=(const U8*)localityMA,(o)->localityLen=(U8)strlen(localityMA) |
| | setLocality More...
|
| |
| #define | SharkSslCertDN_setOrganization(o, organizationMA) (o)->organization=(const U8*)organizationMA,(o)->organizationLen=(U8)strlen(organizationMA) |
| | setOrganization More...
|
| |
| #define | SharkSslCertDN_setUnit(o, unitMA) (o)->unit=(const U8*)unitMA,(o)->unitLen=(U8)strlen(unitMA) |
| | setUnit More...
|
| |
| #define | SharkSslCertDN_setCommonName(o, commonNameMA) (o)->commonName=(const U8*)commonNameMA,(o)->commonNameLen=(U8)strlen(commonNameMA) |
| | setCommonName More...
|
| |
| #define | SharkSslCertDN_setEmailAddress(o, emailAddressMA) (o)->emailAddress=(const U8*)emailAddressMA,(o)->emailAddressLen=(U8)strlen(emailAddressMA) |
| | setEmailAddress More...
|
| |
| #define | SharkSsl_setIntf(o, sharkSslIntf) (o)->intf=sharkSslIntf |
| |
| #define | SharkSsl_getIntf(o) (o)->intf |
| |
| #define | SharkSslCon_terminate(o) SharkSsl_terminateCon(0, o) |
| | The SharkSslCon object must be reclaimed when you close the network connection. More...
|
| |
| #define | SHARKSSL_KEY_UPDATE_NOT_REQUESTED 0 |
| | Updates the local write keys without requesting a reciprocal update of the peer's write keys. More...
|
| |
| #define | SHARKSSL_KEY_UPDATE_REQUESTED 1 |
| | Updates the local write keys and requests a reciprocal update of the peer's write keys. More...
|
| |
| #define | SharkSslCon_getAlertData(o) SharkSslCon_getEncData(o) |
| | This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCon_encrypt. More...
|
| |
| #define | SharkSslCon_getAlertDataLen(o) SharkSslCon_getEncDataLen(o) |
| | This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCon_encrypt. More...
|
| |
| #define | SharkSsl_setCAList(o, caList) SharkSsl_setCAListEx((o), (caList), 0) |
| | Install an application-trusted CA list without validating its allocation extent. More...
|
| |
| #define | SHARKSSL_SET_FAVOR_RSA 1 |
| | Enable RSA preference in SharkSslCon_favorRSA. More...
|
| |
| #define | SHARKSSL_CLEAR_FAVOR_RSA 0 |
| | Disable RSA preference in SharkSslCon_favorRSA. More...
|
| |
| #define | SharkSslCon_requestClientCert(o, caList) SharkSslCon_requestClientCertEx((o), (caList), 0) |
| | Request client authentication with an application-trusted CA list. More...
|
| |
| #define | SharkSslCon_setCertificateAuthorities(o, caList) SharkSslCon_setCertificateAuthoritiesEx((o), (caList), 0) |
| | Configure the extension with an application-trusted CA list. More...
|
| |
| #define | SHARKSSL_RSA_NO_PADDING 0 |
| | SHARKSSL_RSA_NO_PADDING for raw RSA encryption (insecure). More...
|
| |
| #define | SHARKSSL_RSA_PKCS1_PADDING 1 |
| | SHARKSSL_RSA_PKCS1_PADDING for PKCS #1 v1.5. More...
|
| |
| #define | _SHARKSSLRSAKEY_FREE 1 |
| |
| #define | SHARKSSL_EC_CURVE_ID_SECP256R1 23 |
| | To be used as hashlen parameter in sharkssl_ECDSA_ functions These are the hash lengths for the functions implemented in SharkSSL/RayCrypto. More...
|
| |
| #define | SHARKSSL_EC_CURVE_ID_SECP384R1 24 |
| |
| #define | SHARKSSL_EC_CURVE_ID_SECP521R1 25 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP256R1 26 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP384R1 27 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP512R1 28 |
| |
| #define | SHARKSSL_EC_CURVE_ID_CURVE25519 29 |
| |
| #define | SHARKSSL_EC_CURVE_ID_CURVE448 30 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP256R1TLS13 31 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP384R1TLS13 32 |
| |
| #define | SHARKSSL_EC_CURVE_ID_BRAINPOOLP512R1TLS13 33 |
| |
| #define | SHARKSSL_X25519_KEY_LEN 32 |
| |
| #define | SharkSslECCKey_create(privKey, curveID) SharkSslECCKey_createEx((privKey), (curveID), 0, 0) |
| | A macro for creating an ECC key using the SharkSSL library. More...
|
| |
| #define | _SHARKSSLECCKEY_FREE 1 |
| |
| #define | SharkSslKey_free SharkSslRSAKey_free |
| |
| #define | SharkSslCert_vectSize(c) SharkSslKey_vectSize((const SharkSslCert)c) |
| |
| #define | SharkSslCert_vectSize_keyInfo(c, t, p, a, b, x, y) SharkSslKey_vectSize_keyInfo((const SharkSslKey)c, t, p, a, b, x, y) |
| |
| #define | SharkSslRSAKey_vectSize(k) SharkSslKey_vectSize(k) |
| |
| #define | SharkSslRSAKey_vectSize_keyInfo(k, t, p, a, b, x, y) SharkSslKey_vectSize_keyInfo((const SharkSslKey)k, t, p, a, b, x, y) |
| |
| #define | SharkSslECCKey_vectSize(k) SharkSslKey_vectSize(k) |
| |
| #define | SharkSslECCKey_vectSize_keyInfo(k, t, p, a, b, x, y) SharkSslKey_vectSize_keyInfo((const SharkSslKey)k, t, p, a, b, x, y) |
| |
| #define | SHARKSSL_KEYTYPE_RSA 0x00 |
| |
| #define | SHARKSSL_KEYTYPE_EC 0x02 |
| |
| #define | SharkSslCertStore_release(o) SharkSslCertStore_destructor(o) |
| | Alias for SharkSslCertStore_destructor. More...
|
| |
|
| SHARKSSL_API U16 | SharkSslCert_len (SharkSslCert cert) |
| | Get certificate length. More...
|
| |
| U32 | baGetUnixTime (void) |
| | Platform dependent function returning seconds since Jan 1 1970. More...
|
| |
| SHARKSSL_API int | SharkSslASN1Create_CSR (struct SharkSslASN1Create *o, SharkSslKey privKey, U8 hashID, struct SharkSslCertDN *certDN, const char *SAN, struct SharkSslBitExtReq *keyUsage, struct SharkSslBitExtReq *nsCertType) |
| | CSR creation (all parameters are input parameters) More...
|
| |
| SHARKSSL_API int | SharkSslASN1Create_key (struct SharkSslASN1Create *o, const SharkSslKey key) |
| | CSR signing policy and SharkSslCert_signCSR are declared in SharkSslCSR.h. More...
|
| |
| SHARKSSL_API void * | sharkssl_mallocObject (size_t size) |
| |
| SHARKSSL_API void | sharkssl_freeObject (void *object) |
| |
| SHARKSSL_API void | SharkSsl_constructor (SharkSsl *o, SharkSsl_Role role, U16 cacheSize, U16 inBufStartSize, U16 outBufSize) |
| | A SharkSsl object is the coordinator for managing SharkSslCon objects. More...
|
| |
| SHARKSSL_API void | SharkSsl_destructor (SharkSsl *o) |
| | Close the SharkSsl object. More...
|
| |
| SharkSslCon * | SharkSsl_createCon (SharkSsl *o) |
| | Create a SharkSslCon object. More...
|
| |
| void | SharkSsl_terminateCon (const SharkSsl *o, SharkSslCon *con) |
| | Terminate a SharkSslCon object created by function SharkSsl_createCon. More...
|
| |
| SHARKSSL_API U16 | SharkSsl_getCacheSize (SharkSsl *o) |
| | Returns the SharkSsl session cache size. More...
|
| |
| SharkSslCon_RetVal | SharkSslCon_decrypt (SharkSslCon *o, U16 readLen) |
| | Decrypt the received data copied into the SharkSslCon receive buffer (the buffer returned by SharkSslCon_getBuf). More...
|
| |
| SharkSslCon_RetVal | SharkSslCon_encrypt (SharkSslCon *o, U8 *buf, U16 maxLen) |
| | Encrypt the data provided by parameter 'buf' or encrypt data in the SharkSslCon send buffer. More...
|
| |
| SHARKSSL_API SharkSslCon_RetVal | SharkSslCon_close (SharkSslCon *o) |
| | Generates a close_notify alert and closes the local write direction. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_keyUpdate (SharkSslCon *o, U8 requestUpdate) |
| | Creates a TLS 1.3 KeyUpdate message and advances the local write keys. More...
|
| |
| SHARKSSL_API int | SharkSslCon_proactiveKeyUpdate (SharkSslCon *o) |
| | Apply the automatic AES-GCM KeyUpdate policy while the output buffer is free. More...
|
| |
| U8 | SharkSslCon_isHandshakeComplete (SharkSslCon *o) |
| | Returns the following values: More...
|
| |
| U8 | SharkSslCon_encryptMore (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCon_encrypt. More...
|
| |
| U8 | SharkSslCon_decryptMore (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Decrypted returned by function SharkSslCon_decrypt. More...
|
| |
| U8 * | SharkSslCon_getBuf (SharkSslCon *o) |
| | Returns a pointer to the SharkSslCon input/receive buffer. More...
|
| |
| U16 | SharkSslCon_getBufLen (SharkSslCon *o) |
| | Returns the number of bytes currently available at the pointer returned by SharkSslCon_getBuf. More...
|
| |
| U16 | SharkSslCon_copyDecData (SharkSslCon *o, U8 *buf, U16 maxLen) |
| | Copy decoded data to 'buf'. More...
|
| |
| SHARKSSL_API U16 | SharkSslCon_getDecData (SharkSslCon *o, U8 **bufPtr) |
| | Get a pointer to the decoded data. More...
|
| |
| U8 * | SharkSslCon_getHandshakeData (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Handshake returned by function SharkSslCon_encrypt. More...
|
| |
| U16 | SharkSslCon_getHandshakeDataLen (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Handshake returned by function SharkSslCon_decrypt. More...
|
| |
| U16 | SharkSslCon_setHandshakeDataSent (SharkSslCon *o, U16 length) |
| | This function is used in conjunction with SharkSslCon_getHandshakeData. More...
|
| |
| U8 * | SharkSslCon_getEncData (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCon_encrypt. More...
|
| |
| U16 | SharkSslCon_getEncDataLen (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_Encrypted returned by function SharkSslCon_encrypt. More...
|
| |
| U8 * | SharkSslCon_getEncBufPtr (SharkSslCon *o) |
| | This function is used in conjunction with SharkSslCon_encrypt when using the zero copy send API. More...
|
| |
| U16 | SharkSslCon_getEncBufSize (SharkSslCon *o) |
| | Returns the length of the buffer returned by SharkSslCon_getEncBufPtr. More...
|
| |
| U8 | SharkSslCon_getAlertLevel (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCon_encrypt or in conjunction with state SharkSslCon_AlertRecv returned by function SharkSslCon_decrypt. More...
|
| |
| U8 | SharkSslCon_getAlertDescription (SharkSslCon *o) |
| | This function is used in conjunction with state SharkSslCon_AlertSend returned by function SharkSslCon_encrypt or in conjunction with state SharkSslCon_AlertRecv returned by function SharkSslCon_decrypt. More...
|
| |
| SHARKSSL_API U16 | SharkSslCon_getCiphersuite (SharkSslCon *o) |
| | Returns the active session's chiper suite. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_getProtocol (SharkSslCon *o) |
| | Returns the active session's protocol version. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_setSNI (SharkSslCon *o, const char *name, U16 length) |
| | set Server Name Indication for TLS client connections More...
|
| |
| U8 | SharkSslCon_certificateRequested (SharkSslCon *o) |
| | Returns TRUE if the server requested a certificate from the client to verify that the client's identity (authentication) More...
|
| |
| SHARKSSL_API SharkSslCertInfo * | SharkSslCon_getCertInfo (SharkSslCon *o) |
| | Returns the peer's certificate if the handshaking has completed. More...
|
| |
| SHARKSSL_API int | SharkSslCertInfo_parseCert (SharkSslCertInfo *o, const U8 *der, U32 len) |
| | Parse a DER certificate and return its certificate information. More...
|
| |
| SHARKSSL_API U8 | SharkSsl_addCertificate (SharkSsl *o, SharkSslCert cert) |
| | Add a certificate to the SharkSsl object. More...
|
| |
| SHARKSSL_API U8 | SharkSsl_addCertificatePSA (SharkSsl *o, SharkSslCert cert, psa_key_id_t psaKey) |
| | Add an RSA, EC, or EdDSA certificate with a provider-owned private signing key. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_selectCertificatePSA (SharkSslCon *o, SharkSslCert cert) |
| | Select one PSA certificate already registered on this connection's SharkSsl object. More...
|
| |
| SHARKSSL_API U8 | SharkSsl_setCAListEx (SharkSsl *o, SharkSslCAList caList, U32 caListLen) |
| | Set a Certificate Authority (CA) list so the SharkSSL object can perform certificate validation on the peer's certificate. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_trustedCA (SharkSslCon *o) |
| | Returns TRUE if the certificate is valid and is signed with a root certificate trusted by SharkSSL. More...
|
| |
| U8 | SharkSslCon_isCAListEmpty (SharkSslCon *o) |
| |
| U8 | SharkSslCon_favorRSA (SharkSslCon *o, U8 flag) |
| | Configures TLS 1.2 cipher-suite selection to favor RSA-authenticated suites when both RSA and ECDSA certificates are available. More...
|
| |
| U8 | SharkSslCon_selectProtocol (SharkSslCon *o, U8 protocol) |
| |
| SHARKSSL_API U8 | SharkSslCon_isResumed (SharkSslCon *o) |
| | Returns 1 if the current session is a resumed one. More...
|
| |
| SHARKSSL_API U8 | SharkSslSession_release (SharkSslSession *o, SharkSsl *s) |
| | Release a session created by function SharkSslCon_acquireSession. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_releaseSession (SharkSslCon *o) |
| | experimental More...
|
| |
| SHARKSSL_API SharkSslSession * | SharkSslCon_acquireSession (SharkSslCon *o) |
| | Request a SharkSslSession object from the client's session pool. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_resumeSession (SharkSslCon *o, SharkSslSession *s) |
| | Resume an existing session. More...
|
| |
| SHARKSSL_API U32 | SharkSslSession_getLatestAccessTime (SharkSslSession *o) |
| | Returns the last time the session was accessed. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_requestClientCertEx (SharkSslCon *o, const void *caList, U32 caListLen) |
| | Request client-certificate authentication. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_setCertificateAuthoritiesEx (SharkSslCon *o, const void *caList, U32 caListLen) |
| | Configure the TLS 1.3 Certificate Authorities extension specified in RFC 9846, Section 4.2.4. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_setALPNProtocols (SharkSslCon *o, const char *protList) |
| | This function is used by client solutions to specify a list of application layer protocols according to RFC 7301 (ALPN). More...
|
| |
| SHARKSSL_API const char * | SharkSslCon_getALPNProtocol (SharkSslCon *o) |
| | This function is used by client solutions to return the application layer protocol selected by the server among the ones specified through SharkSslCon_setALPNProtocols. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_setALPNFunction (SharkSslCon *o, ALPNFunction func, void *pvoid) |
| |
| SHARKSSL_API U8 | SharkSslCon_selectCiphersuite (SharkSslCon *o, U16 cipherSuite) |
| | This function enables you to limit the number of ciphers at runtime. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_clearCiphersuiteSelection (SharkSslCon *o) |
| | Clears the selection, thus enabling all ciphers. More...
|
| |
| SHARKSSL_API U8 | SharkSslCon_renegotiate (SharkSslCon *o) |
| | This function enables you to renegotiate an already established SSL/TLS connection. More...
|
| |
| SHARKSSL_API sharkssl_PEM_RetVal | sharkssl_PEM (const char *certPEM, const char *keyPEM, const char *passphrase, SharkSslCert *sharkSslCert) |
| | Create a SharkSslCert from PEM data. More...
|
| |
| SHARKSSL_API int | sharkssl_PEM_PBKDF2 (U8 *dk, const char *passphrase, const char *salt, U32 saltLen, U32 iterations, U16 dkLen, U8 hashID) |
| | sharkssl_PEM_PBKDF2 (output, passphrase, salt, salt_len, iterations, dkLen, hashID) Derives a key from a passphrase using the PBKDF2 algorithm as specified in RFC 8018 section 5.2. More...
|
| |
| SHARKSSL_API SharkSslRSAKey | sharkssl_PEM_to_RSAKey (const char *PEMKey, const char *passphrase) |
| | Convert an RSA private or public key in PEM format to the SharkSslRSAKey format. More...
|
| |
| SHARKSSL_API SharkSslKey | sharkssl_PEM_extractPublicKey (const char *certPEM) |
| | Extract the public key form a certificate in PEM format. More...
|
| |
| SHARKSSL_API SharkSslKey | sharkssl_PEM_extractPublicKey_ext (const char *certPEM, U8 *keyType) |
| |
| SHARKSSL_API void | SharkSslRSAKey_free (SharkSslRSAKey key) |
| | Release a SharkSslRSAKey allocated by functions sharkssl_PEM_to_RSAKey and sharkssl_PEM_extractPublicKey. More...
|
| |
| SHARKSSL_API int | SharkSslRSAKey_create (SharkSslRSAKey *privKey, U16 keyLength) |
| | RSA key creation. More...
|
| |
| SHARKSSL_API U8 * | SharkSslRSAKey_getPublic (SharkSslRSAKey privKey) |
| | RSA public key extraction from a private key. More...
|
| |
| SHARKSSL_API U16 | SharkSslRSAKey_size (SharkSslRSAKey key) |
| | Returns the private or public key's modulus size in bytes. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_public_encrypt (SharkSslRSAKey pubkey, const U8 *in, int len, U8 *out, int padding) |
| | Encrypt data using the public key or private key. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_private_decrypt (SharkSslRSAKey privkey, const U8 *in, int len, U8 *out, int padding) |
| | Decrypt ciphertext using the private key. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_PKCS1V1_5_sign_hash (SharkSslRSAKey privkey, U8 *sig, U16 *siglen, const U8 *hash, U8 hashID) |
| | Sign a hash using a private RSA key. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_PKCS1V1_5_verify_hash (SharkSslRSAKey pubkey, U8 *sig, U16 siglen, const U8 *hash, U8 hashID) |
| | Verify a signature hash using a public RSA key. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_private_decrypt_OAEP (SharkSslRSAKey privkey, U8 *in, int len, U8 hashID, U8 *out, const char *label, U16 labelLen) |
| | Decrypt ciphertext using the private key, padding is OAEP per RFC 8017. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_public_encrypt_OAEP (SharkSslRSAKey pubkey, const U8 *in, int len, U8 hashID, U8 *out, const char *label, U16 labelLen) |
| | Encrypt cleartext using the public key, padding is OAEP per RFC 8017. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_private_encrypt (SharkSslRSAKey privkey, const U8 *in, int len, U8 *out, int padding) |
| | Sign a message digest using the private key. More...
|
| |
| SHARKSSL_API sharkssl_RSA_RetVal | sharkssl_RSA_public_decrypt (SharkSslRSAKey pubkey, const U8 *in, int len, U8 *out, int padding) |
| | Bring back a message digest using the public key or private key. More...
|
| |
| SHARKSSL_API int | sharkssl_X25519_createKeyPair (U8 privateKey[SHARKSSL_X25519_KEY_LEN], U8 publicKey[SHARKSSL_X25519_KEY_LEN]) |
| | Create an X25519 private/public key pair. More...
|
| |
| SHARKSSL_API int | sharkssl_X25519_sharedSecret (const U8 privateKey[SHARKSSL_X25519_KEY_LEN], const U8 peerPublicKey[SHARKSSL_X25519_KEY_LEN], U8 sharedSecret[SHARKSSL_X25519_KEY_LEN]) |
| | Calculate an X25519 shared secret. More...
|
| |
| SHARKSSL_API SharkSslECCKey | sharkssl_PEM_to_ECCKey (const char *PEMKey, const char *passphrase) |
| | Convert an ECC private or public key in PEM format to the SharkSslECCKey format. More...
|
| |
| SHARKSSL_API int | SharkSslECCKey_createEx (SharkSslECCKey *privKey, U16 curveID, void *rngHandle, sharkssl_rngfunc rngFunc) |
| | Creates an ECC key using the SharkSSL library. More...
|
| |
| SHARKSSL_API void | SharkSslECCKey_free (SharkSslECCKey key) |
| | Release a SharkSslECCKey allocated by functions sharkssl_PEM_to_ECCKey or SharkSslECCKey_create. More...
|
| |
| SHARKSSL_API U16 | sharkssl_ECDSA_siglen (SharkSslECCKey privkey) |
| | Returns the maximum length (in bytes) of a DER-encoded ECDSA signature generated with the private key 'privkey'. More...
|
| |
| SHARKSSL_API sharkssl_ECDSA_RetVal | sharkssl_ECDSA_sign_hash (SharkSslECCKey privkey, U8 *sig, U16 *siglen, const U8 *hash, U8 hashID) |
| | Generate the signature using the ECC private key and a hash. More...
|
| |
| SHARKSSL_API sharkssl_ECDSA_RetVal | sharkssl_ECDSA_verify_hash (SharkSslECCKey pubkey, U8 *sig, U16 siglen, const U8 *hash, U8 hashID) |
| | Verify a message using the ECC public key and a hash algorithm. More...
|
| |
| SHARKSSL_API U16 | SharkSslKey_vectSize (const SharkSslKey key) |
| | Returns the private or public key's "vector size" in bytes. More...
|
| |
| SHARKSSL_API U16 | SharkSslKey_vectSize_keyInfo (const SharkSslKey key, U8 *keyType, U8 *isKeyPrivate, U8 **d1, U16 *d1Len, U8 **d2, U16 *d2Len) |
| | Returns the private or public key's "vector size" in bytes. More...
|
| |
| SHARKSSL_API void | SharkSslCertStore_constructor (SharkSslCertStore *o) |
| | Initialize a SharkSslCertStore object. More...
|
| |
| SHARKSSL_API void | SharkSslCertStore_destructor (SharkSslCertStore *o) |
| | Cleanup all memory used by the SharkSslCAList object. More...
|
| |
| SHARKSSL_API U16 | SharkSslCertStore_add (SharkSslCertStore *o, const char *cert, U32 certlen) |
| | Add one or more certificates to the CA store. More...
|
| |
| SHARKSSL_API U8 | SharkSslCertStore_assemble (SharkSslCertStore *o, SharkSslCAList *outList) |
| | Assemble all certificates added by calling SharkSslCertStore_add. More...
|
| |
| SHARKSSL_API U32 | sharkssl_B64Decode (U8 *outStr, U32 outStrSize, const char *b64beg, const char *b64end) |
| |