mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
dir changes - things are broken at the moment
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@116 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -37,7 +37,7 @@ else
|
||||
LIBS=-L../$(STAGE) -laxtls
|
||||
endif
|
||||
|
||||
CFLAGS += -I../ssl
|
||||
AXTLS_HOME=..
|
||||
|
||||
ifdef CONFIG_HTTP_BUILD_LUA
|
||||
lua: kepler-1.1
|
||||
|
@ -112,10 +112,10 @@ int main(int argc, char *argv[])
|
||||
RNG_terminate();
|
||||
base64_encode(md5_salt, MD5_SIZE, b64_salt, sizeof(b64_salt));
|
||||
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, md5_salt, MD5_SIZE);
|
||||
MD5Update(&ctx, (uint8_t *)pw, strlen(pw));
|
||||
MD5Final(&ctx, md5_pass);
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, md5_salt, MD5_SIZE);
|
||||
MD5_Update(&ctx, (uint8_t *)pw, strlen(pw));
|
||||
MD5_Final(md5_pass, &ctx);
|
||||
base64_encode(md5_pass, MD5_SIZE, b64_pass, sizeof(b64_pass));
|
||||
|
||||
printf("Add the following to your '.htpasswd' file\n");
|
||||
|
@ -903,10 +903,10 @@ static int check_digest(char *salt, const char *msg_passwd)
|
||||
return -1;
|
||||
|
||||
/* very simple MD5 crypt algorithm, but then the salt we use is large */
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, b256_salt, salt_size); /* process the salt */
|
||||
MD5Update(&ctx, (uint8_t *)msg_passwd, strlen(msg_passwd));
|
||||
MD5Final(&ctx, md5_result);
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, b256_salt, salt_size); /* process the salt */
|
||||
MD5_Update(&ctx, (uint8_t *)msg_passwd, strlen(msg_passwd));
|
||||
MD5_Final(md5_result, &ctx);
|
||||
return memcmp(md5_result, real_passwd, MD5_SIZE);/* 0 = ok */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user