check in some experimental X.509 parsing code
This commit is contained in:
13
tls_cipherprio.c
Normal file
13
tls_cipherprio.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <tinytls.h>
|
||||
|
||||
static uint16_t ciphers[] = {
|
||||
TLS_RSA_WITH_AES_256_CBC_SHA256,
|
||||
TLS_RSA_WITH_AES_256_CBC_SHA,
|
||||
};
|
||||
|
||||
int tls_cipherprio(uint16_t cipher) {
|
||||
size_t i;
|
||||
for (i=0; i<sizeof(ciphers)/sizeof(ciphers[0]); ++i)
|
||||
if (ciphers[i]==cipher) return i;
|
||||
return -1;
|
||||
}
|
||||
Reference in New Issue
Block a user