MCPcopy
hub / github.com/openwrt/luci / do_server

Method do_server

libs/nixio/axTLS/samples/java/axssl.java:91–322  ·  view source on GitHub ↗
(int build_mode, String[] args)

Source from the content-addressed store, hash-verified

89 * do_server()
90 */
91 private void do_server(int build_mode, String[] args)
92 throws Exception
93 {
94 int i = 1;
95 int port = 4433;
96 int options = axtlsj.SSL_DISPLAY_CERTS;
97 boolean quiet = false;
98 String password = null;
99 String private_key_file = null;
100
101 /* organise the cert/ca_cert lists */
102 int cert_size = SSLUtil.maxCerts();
103 int ca_cert_size = SSLUtil.maxCACerts();
104 String[] cert = new String[cert_size];
105 String[] ca_cert = new String[ca_cert_size];
106 int cert_index = 0;
107 int ca_cert_index = 0;
108
109 while (i < args.length)
110 {
111 if (args[i].equals("-accept"))
112 {
113 if (i >= args.length-1)
114 {
115 print_server_options(build_mode, args[i]);
116 }
117
118 port = Integer.parseInt(args[++i]);
119 }
120 else if (args[i].equals("-quiet"))
121 {
122 quiet = true;
123 options &= ~(int)axtlsj.SSL_DISPLAY_CERTS;
124 }
125 else if (build_mode >= axtlsj.SSL_BUILD_SERVER_ONLY)
126 {
127 if (args[i].equals("-cert"))
128 {
129 if (i >= args.length-1 || cert_index >= cert_size)
130 {
131 print_server_options(build_mode, args[i]);
132 }
133
134 cert[cert_index++] = args[++i];
135 }
136 else if (args[i].equals("-key"))
137 {
138 if (i >= args.length-1)
139 {
140 print_server_options(build_mode, args[i]);
141 }
142
143 private_key_file = args[++i];
144 options |= axtlsj.SSL_NO_DEFAULT_KEY;
145 }
146 else if (args[i].equals("-pass"))
147 {
148 if (i >= args.length-1)

Callers 1

mainMethod · 0.95

Calls 12

maxCertsMethod · 0.95
maxCACertsMethod · 0.95
print_server_optionsMethod · 0.95
connectMethod · 0.95
handshakeStatusMethod · 0.95
display_session_idMethod · 0.95
display_cipherMethod · 0.95
getDataMethod · 0.95
displayErrorMethod · 0.95
disposeMethod · 0.95
objLoadMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected