src/x509.c

changeset 35
4994321eae31
parent 33
cc36229b3be1
equal deleted inserted replaced
34:510432315106 35:4994321eae31
267 unsigned int bytes; 267 unsigned int bytes;
268 unsigned char buffer[EVP_MAX_MD_SIZE]; 268 unsigned char buffer[EVP_MAX_MD_SIZE];
269 char hex_buffer[EVP_MAX_MD_SIZE*2]; 269 char hex_buffer[EVP_MAX_MD_SIZE*2];
270 const EVP_MD *digest; 270 const EVP_MD *digest;
271 cert = luasec_to_x509(L, 1); 271 cert = luasec_to_x509(L, 1);
272 if (lua_gettop(L) < 2 || strcmp(luaL_checkstring(L, 1), "sha1") == 0) 272 if (lua_gettop(L) < 2 || strcmp(luaL_checkstring(L, 2), "sha1") == 0)
273 { 273 {
274 digest = EVP_sha1(); 274 digest = EVP_sha1();
275 } 275 }
276 else 276 else
277 { 277 {

mercurial