Merge pull request #140 from mrdeep1/coap-server-pki-fix

coap-server: Re-order code (move fill_keystore) to support PKI
This commit is contained in:
obgm authored and GitHub committed 2018-02-26 17:25:44 +01:00
commit 4885d87f6d
1 file changed
+2 -1
+2 -1
View File
@@ -349,6 +349,8 @@ get_context(const char *node, const char *port) {
if (!ctx) {
return NULL;
}
/* Need PSK set up before we set up (D)TLS endpoints */
fill_keystore(ctx);
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
@@ -526,7 +528,6 @@ main(int argc, char **argv) {
if (!ctx)
return -1;
fill_keystore(ctx);
init_resources(ctx);
/* join multicast group if requested at command line */