ssl: Improved the SslVersion enum and updated the param type for sslCreateContext.

This commit is contained in:
yellows8 2020-04-29 12:26:44 -04:00
parent 3f5362a7bb
commit ea77c1d4cb
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 7 additions and 7 deletions

View File

@ -71,12 +71,12 @@ typedef enum {
SslDebugOptionType_AllowDisableVerifyOption = 0, ///< AllowDisableVerifyOption
} SslDebugOptionType;
/// SslVersion
/// SslVersion. This is a bitmask which controls the min/max TLS versions to use, depending on which lowest/highest bits are set (if Auto isn't set).
typedef enum {
SslVersion_Auto = 0x1, ///< Auto
SslVersion_TlsV10 = 0x8, ///< TlsV10
SslVersion_TlsV11 = 0x10, ///< TlsV11
SslVersion_TlsV12 = 0x20, ///< TlsV12
SslVersion_Auto = BIT(0), ///< TLS version min = 1.0, max = 1.2.
SslVersion_TlsV10 = BIT(3), ///< TLS 1.0.
SslVersion_TlsV11 = BIT(4), ///< TLS 1.1.
SslVersion_TlsV12 = BIT(5), ///< TLS 1.2.
} SslVersion;
/// CertificateFormat
@ -201,7 +201,7 @@ Service* sslGetServiceSession(void);
* @param[out] c \ref SslContext
* @param[in] ssl_version \ref SslVersion
*/
Result sslCreateContext(SslContext *c, SslVersion ssl_version);
Result sslCreateContext(SslContext *c, u32 ssl_version);
/**
* @brief GetContextCount

View File

@ -155,7 +155,7 @@ static Result _sslCmdOutBufOutU32(Service* srv, void* buffer, size_t size, u32 *
);
}
Result sslCreateContext(SslContext *c, SslVersion ssl_version) {
Result sslCreateContext(SslContext *c, u32 ssl_version) {
if (!serviceIsActive(&g_sslSrv))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);