Skip to content

Commit

Permalink
apply the format
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Dec 13, 2015
1 parent c8089df commit f415c1f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ int dumb_https_server(unsigned short port, SSL_CTX *ctx)
SSL_set_fd(ssl, conn_fd);
if (SSL_accept(ssl) == 1) {
SSL_read(ssl, buf, sizeof(buf));
const char *resp = "HTTP/1.0 200 OK\r\nContent-Length: 6\r\nConnection: close\r\nContent-Type: text/plain\r\n\r\nhello\n";
const char *resp =
"HTTP/1.0 200 OK\r\nContent-Length: 6\r\nConnection: close\r\nContent-Type: text/plain\r\n\r\nhello\n";
SSL_write(ssl, resp, strlen(resp));
SSL_shutdown(ssl);
} else {
Expand Down Expand Up @@ -136,10 +137,10 @@ int main(int argc, char **argv)
return 111;
}
} else {
if (SSL_CTX_use_PrivateKey_file(ctx, argv[4], SSL_FILETYPE_PEM) != 1) {
fprintf(stderr, "failed to load private key from file:%s\n", argv[4]);
return 111;
}
if (SSL_CTX_use_PrivateKey_file(ctx, argv[4], SSL_FILETYPE_PEM) != 1) {
fprintf(stderr, "failed to load private key from file:%s\n", argv[4]);
return 111;
}
}

/* start the httpd */
Expand Down

0 comments on commit f415c1f

Please sign in to comment.