-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
91 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,11 +37,51 @@ function TestX509ext:testSupport() | |
assert(obj) | ||
assert(not ext.support(obj)) | ||
|
||
local subjectAltName = ext.new_extension { | ||
object = 'subjectAltName', | ||
value = "IP:192.168.0.1" | ||
local exts = { | ||
{ | ||
object = 'subjectAltName', | ||
value = 'IP:192.168.1.1,RID:1.2.3.4' | ||
}, | ||
{ | ||
object = 'subjectAltName', | ||
value = 'IP:192.168.1.1' | ||
}, | ||
{ | ||
object = 'subjectAltName', | ||
value = 'DNS:abc.xyz' | ||
}, | ||
{ | ||
object = 'subjectAltName', | ||
value = 'URI:http://my.url.here/' | ||
}, | ||
{ | ||
object = 'subjectAltName', | ||
value = 'otherName:1.2.3.4;UTF8:some other identifier' | ||
}, | ||
{ | ||
object = 'subjectAltName', | ||
value = 'email:[email protected]' | ||
}, | ||
--{ | ||
-- object = 'subjectAltName', | ||
-- value = 'x400Name:C=US/O=Organization/G=Nuno/CN=demo' | ||
--}, | ||
--{ | ||
-- object = 'subjectAltName', | ||
-- value = 'EdiPartyName:[email protected]' | ||
--}, | ||
--{ | ||
-- object = 'subjectAltName', | ||
-- value = 'dirName:/C=NZ/CN=Jackov al-Trades' | ||
--} | ||
} | ||
assert(ext.support(subjectAltName)) | ||
|
||
for i=1, #exts do | ||
local obj = ext.new_extension(exts[i]) | ||
assert(ext.support(obj)) | ||
lu.assertIsTable(obj:info()) | ||
end | ||
|
||
end | ||
|
||
function TestX509ext:testAll() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,6 @@ function TestX509:testNew() | |
{ | ||
object = 'subjectAltName', | ||
value = 'IP:192.168.1.1' | ||
|
||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters