# HG changeset patch # User Paul Aurich # Date 1290312251 28800 # Node ID cc36229b3be1f1271bda0e7989da51017695fc4d # Parent c47594a84f04842ef28048671d1c03040d3d52f7 x509: Flesh out the SAN types diff -r c47594a84f04 -r cc36229b3be1 src/x509.c --- a/src/x509.c Sat Nov 20 20:04:11 2010 -0800 +++ b/src/x509.c Sat Nov 20 20:04:11 2010 -0800 @@ -173,15 +173,46 @@ lua_pop(L, 1); break; } + case GEN_EMAIL: + lua_pushstring(L, "rfc822Name"); + luasec_push_subtable(L, -2); + luasec_push_asn1_string(L, general_name->d.rfc822Name); + lua_rawseti(L, -2, lua_objlen(L, -2)+1); + lua_pop(L, 1); + break; case GEN_DNS: - { lua_pushstring(L, "dNSName"); luasec_push_subtable(L, -2); luasec_push_asn1_string(L, general_name->d.dNSName); lua_rawseti(L, -2, lua_objlen(L, -2)+1); lua_pop(L, 1); break; - } + case GEN_X400: + /* x400Address */ + break; + case GEN_DIRNAME: + /* directoryName */ + break; + case GEN_EDIPARTY: + /* ediPartyName */ + break; + case GEN_URI: + lua_pushstring(L, "uniformResourceIdentifier"); + luasec_push_subtable(L, -2); + luasec_push_asn1_string(L, general_name->d.uniformResourceIdentifier); + lua_rawseti(L, -2, lua_objlen(L, -2)+1); + lua_pop(L, 1); + break; + case GEN_IPADD: + lua_pushstring(L, "iPAddress"); + luasec_push_subtable(L, -2); + luasec_push_asn1_string(L, general_name->d.iPAddress); + lua_rawseti(L, -2, lua_objlen(L, -2)+1); + lua_pop(L, 1); + break; + case GEN_RID: + /* registeredID */ + break; default: break; }