diff --git a/src/common/cs_dbg.c b/src/common/cs_dbg.c
index da1bc2e928e55bb7d8f6f2487c3b5023cbbe9b57..62a5816db5d576455a2f4c6624310dbc86d22d9a 100644
--- a/src/common/cs_dbg.c
+++ b/src/common/cs_dbg.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/cs_dbg.h"
diff --git a/src/common/cs_dbg.h b/src/common/cs_dbg.h
index 24a702209432642bb333b8c2891f79d4362481bd..5e96433477471f72d94c154507da1b502f694f16 100644
--- a/src/common/cs_dbg.h
+++ b/src/common/cs_dbg.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_CS_DBG_H_
diff --git a/src/common/cs_md5.h b/src/common/cs_md5.h
index 1450fd26063b347e551036583f400640efca5982..302b03270e7d473584f0ef4dd1987922b2b5b75c 100644
--- a/src/common/cs_md5.h
+++ b/src/common/cs_md5.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_MD5_H_
diff --git a/src/common/cs_time.c b/src/common/cs_time.c
index f21845cf8dfa6cc4d9eb7c1d1753640f747128f5..f14de39e97ff55833f988ecccdcb6adcf7aded7e 100644
--- a/src/common/cs_time.c
+++ b/src/common/cs_time.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/cs_time.h"
diff --git a/src/common/cs_time.h b/src/common/cs_time.h
index 3b5907356a360cfa63845c7488da1f21ac7f7b2f..eba5395774598b52f60c86c32dbda2baf6596d73 100644
--- a/src/common/cs_time.h
+++ b/src/common/cs_time.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_CS_TIME_H_
diff --git a/src/common/mg_mem.h b/src/common/mg_mem.h
index 65d71c7c7b98af8496dba9d2ab810ee75010c79f..7fe8381d49e34c62967419e29ffea5f809c801ff 100644
--- a/src/common/mg_mem.h
+++ b/src/common/mg_mem.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_MG_MEM_H_
diff --git a/src/common/platforms/arm/arm_exc.c b/src/common/platforms/arm/arm_exc.c
index 60b50c89506f6f3aba2960641b4cb516e3c64cbb..7f83b3cc4bb74f9bcc173a66d68e2218a230c341 100644
--- a/src/common/platforms/arm/arm_exc.c
+++ b/src/common/platforms/arm/arm_exc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2017 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include <stdint.h>
diff --git a/src/common/platforms/cc3200/cc3200_libc.c b/src/common/platforms/cc3200/cc3200_libc.c
index f488725bdc5bd8fe16c4754e0973a84c228480e2..5262917b337f50ea45284e2388751cd482762dd3 100644
--- a/src/common/platforms/cc3200/cc3200_libc.c
+++ b/src/common/platforms/cc3200/cc3200_libc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if CS_PLATFORM == CS_P_CC3200
diff --git a/src/common/platforms/esp/stub_flasher.c b/src/common/platforms/esp/stub_flasher.c
index be7398cf68bfe41b2a9481c4b21aad7744791db6..d733d3593bd0871d4268db9371d557555941a834 100644
--- a/src/common/platforms/esp/stub_flasher.c
+++ b/src/common/platforms/esp/stub_flasher.c
@@ -1,20 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
  *
- * Spiffy flasher. Implements strong checksums (MD5) and can use higher
- * baud rates. Actual max baud rate will differe from device to device,
- * but 921K seems to be common.
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * SLIP protocol is used for communication.
- * First packet is a single byte - command number.
- * After that, a packet with a variable number of 32-bit (LE) arguments,
- * depending on command.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Then command produces variable number of packets of output, but first
- * packet of length 1 is the response code: 0 for success, non-zero - error.
- *
- * See individual command description below.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "stub_flasher.h"
diff --git a/src/common/platforms/esp32/stubs/led.c b/src/common/platforms/esp32/stubs/led.c
index 6cfc766f18912da67477f2943537c5c1210ce7d1..dfa692107348eb52c10b5b2bab699eaf845c87fe 100644
--- a/src/common/platforms/esp32/stubs/led.c
+++ b/src/common/platforms/esp32/stubs/led.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2017 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "soc/gpio_reg.h"
diff --git a/src/common/platforms/esp32/stubs/led.h b/src/common/platforms/esp32/stubs/led.h
index 505a3f6a310d58c79e03717f10803978a037f1df..e79733d9283d3de66441d42273fccd8ac3693e07 100644
--- a/src/common/platforms/esp32/stubs/led.h
+++ b/src/common/platforms/esp32/stubs/led.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2017 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #pragma once
diff --git a/src/common/platforms/esp32/stubs/stub_hello.c b/src/common/platforms/esp32/stubs/stub_hello.c
index a4c75eb906257b795cf3f2470d256e63cc5e1fde..3f64a406001b6938baaf2aa30b9cbc1ad07aa2ee 100644
--- a/src/common/platforms/esp32/stubs/stub_hello.c
+++ b/src/common/platforms/esp32/stubs/stub_hello.c
@@ -1,9 +1,18 @@
 /*
- * Copyright (c) 2015 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
  *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Stub template.
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include <inttypes.h>
diff --git a/src/common/platforms/esp32/stubs/uart.c b/src/common/platforms/esp32/stubs/uart.c
index c6eb25dc6bcd9a8bd3cf807a6a4f0ffa54672475..8d2bca740ab91134cf204c1bd8625be15932c92c 100644
--- a/src/common/platforms/esp32/stubs/uart.c
+++ b/src/common/platforms/esp32/stubs/uart.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "uart.h"
diff --git a/src/common/platforms/esp32/stubs/uart.h b/src/common/platforms/esp32/stubs/uart.h
index aa3c4ed0f34532c9b1e4f259555860dde32e7fe3..b28edf885fa910fad043e0f765564eca17afe8b4 100644
--- a/src/common/platforms/esp32/stubs/uart.h
+++ b/src/common/platforms/esp32/stubs/uart.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_ESP32_STUBS_UART_H_
diff --git a/src/common/platforms/esp8266/esp_crypto.c b/src/common/platforms/esp8266/esp_crypto.c
index 3d2afa14456a9d4984f1f1ff15914a36cd629354..6469cae0f0c864029f2a3f83de80f4bb8a0b5cc4 100644
--- a/src/common/platforms/esp8266/esp_crypto.c
+++ b/src/common/platforms/esp8266/esp_crypto.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include <stdbool.h>
diff --git a/src/common/platforms/esp8266/esp_hw_wdt_register.h b/src/common/platforms/esp8266/esp_hw_wdt_register.h
index 32c2f3cf291b917334ff48efe8ff350ae7c62740..681d31acb194dabe35541483390bda00d1eec2b3 100644
--- a/src/common/platforms/esp8266/esp_hw_wdt_register.h
+++ b/src/common/platforms/esp8266/esp_hw_wdt_register.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2017 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_ESP8266_ESP_HW_WDT_REGISTER_H_
diff --git a/src/common/platforms/esp8266/esp_missing_includes.h b/src/common/platforms/esp8266/esp_missing_includes.h
index fc7d69f3ede1fef3d98cabf70d12e5d9a6264d97..e6ef8e7cce7757db833ef30e944eb70d934f7b7a 100644
--- a/src/common/platforms/esp8266/esp_missing_includes.h
+++ b/src/common/platforms/esp8266/esp_missing_includes.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_ESP8266_ESP_MISSING_INCLUDES_H_
diff --git a/src/common/platforms/esp8266/esp_ssl_krypton.h b/src/common/platforms/esp8266/esp_ssl_krypton.h
index 086c6b50e5317a72f40e285b0cff3ce951219713..75a2353b06dc8e5bd339d485ccdda599c8d2c42b 100644
--- a/src/common/platforms/esp8266/esp_ssl_krypton.h
+++ b/src/common/platforms/esp8266/esp_ssl_krypton.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_ESP8266_ESP_SSL_KRYPTON_H_
diff --git a/src/common/platforms/esp8266/esp_umm_malloc.c b/src/common/platforms/esp8266/esp_umm_malloc.c
index 3dd4a0e72ddf66ac07306ac1bb522bae9923d069..15869a712f18aac872d9712516eee86a9c16b753 100644
--- a/src/common/platforms/esp8266/esp_umm_malloc.c
+++ b/src/common/platforms/esp8266/esp_umm_malloc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include <string.h>
diff --git a/src/common/platforms/esp8266/esp_umm_malloc.h b/src/common/platforms/esp8266/esp_umm_malloc.h
index efb6f4ba0697a7d66dd7ff9f1be629b2aa17214d..f838e4f3daed85a4f03e268ed5d24aedd01a396e 100644
--- a/src/common/platforms/esp8266/esp_umm_malloc.h
+++ b/src/common/platforms/esp8266/esp_umm_malloc.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if ESP_UMM_ENABLE
diff --git a/src/common/platforms/esp8266/stubs/stub_hello.c b/src/common/platforms/esp8266/stubs/stub_hello.c
index 10a827d906f7e340232a1ee30d9e6b44173d9e11..83c035c4880765a0405ad72e88baf4d9126f8276 100644
--- a/src/common/platforms/esp8266/stubs/stub_hello.c
+++ b/src/common/platforms/esp8266/stubs/stub_hello.c
@@ -1,9 +1,18 @@
 /*
- * Copyright (c) 2015 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
  *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Stub template.
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include <inttypes.h>
diff --git a/src/common/platforms/esp8266/stubs/uart.c b/src/common/platforms/esp8266/stubs/uart.c
index 5651bd84e0b1cbb199c1dea435c59d9e14865ae0..cb99b2d92bcf298cd9594bb91154fde36104619f 100644
--- a/src/common/platforms/esp8266/stubs/uart.c
+++ b/src/common/platforms/esp8266/stubs/uart.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "uart.h"
diff --git a/src/common/platforms/esp8266/stubs/uart.h b/src/common/platforms/esp8266/stubs/uart.h
index fc321c2aea3a3681d1f4e725dd330fd168f0c1e8..ad3ef1dcca425aab5dc1bd5795f5ccbb225c72a0 100644
--- a/src/common/platforms/esp8266/stubs/uart.h
+++ b/src/common/platforms/esp8266/stubs/uart.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_ESP8266_STUBS_UART_H_
diff --git a/src/common/platforms/lwip/mg_lwip.h b/src/common/platforms/lwip/mg_lwip.h
index 1a772aa19f9c68f8b2bf013540ad7aea8355293c..c0d4081e88ee686c93c6c4f7d4ac65e2ab0cf349 100644
--- a/src/common/platforms/lwip/mg_lwip.h
+++ b/src/common/platforms/lwip/mg_lwip.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_
diff --git a/src/common/platforms/lwip/mg_lwip_ev_mgr.c b/src/common/platforms/lwip/mg_lwip_ev_mgr.c
index 11a1bfc1838dbeef1755cc6a28d6abd838527088..1e844a8237ce566c9ff6ed2966207c0873242251 100644
--- a/src/common/platforms/lwip/mg_lwip_ev_mgr.c
+++ b/src/common/platforms/lwip/mg_lwip_ev_mgr.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_NET_IF == MG_NET_IF_LWIP_LOW_LEVEL
diff --git a/src/common/platforms/lwip/mg_lwip_net_if.c b/src/common/platforms/lwip/mg_lwip_net_if.c
index b9042e837cad9ba016478040f0c5aed09ced4521..f73f607a282e7ab346003bb2bdd56dcaba5c171d 100644
--- a/src/common/platforms/lwip/mg_lwip_net_if.c
+++ b/src/common/platforms/lwip/mg_lwip_net_if.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_ENABLE_NET_IF_LWIP_LOW_LEVEL
diff --git a/src/common/platforms/lwip/mg_lwip_net_if.h b/src/common/platforms/lwip/mg_lwip_net_if.h
index d94cfdf6e403b041d6474613b23d9244f31e7a45..d9827a90326df06186f5e0fb8e4fbb387dd9820d 100644
--- a/src/common/platforms/lwip/mg_lwip_net_if.h
+++ b/src/common/platforms/lwip/mg_lwip_net_if.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_LWIP_MG_NET_IF_LWIP_H_
diff --git a/src/common/platforms/mbed/mbed_libc.c b/src/common/platforms/mbed/mbed_libc.c
index a5b35b1fc6b4c48d953597f624e181f6b22b8e6e..ef8e6abbc60ef9e821584417a35e13e326f09423 100644
--- a/src/common/platforms/mbed/mbed_libc.c
+++ b/src/common/platforms/mbed/mbed_libc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/platform.h"
diff --git a/src/common/platforms/msp432/msp432_libc.c b/src/common/platforms/msp432/msp432_libc.c
index faedadc2c37e453f5e51f6df54fe89cd64636e56..de1e6ba858038b4b65d94b75c5cb76b0d2bb3340 100644
--- a/src/common/platforms/msp432/msp432_libc.c
+++ b/src/common/platforms/msp432/msp432_libc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if CS_PLATFORM == CS_P_MSP432
diff --git a/src/common/platforms/nrf5/nrf5_libc.c b/src/common/platforms/nrf5/nrf5_libc.c
index 9cf66dccff9d6fcde4f344a03965fd3ce92a9db0..65d05ed4133523b5ad4f24998cef5271e3105f54 100644
--- a/src/common/platforms/nrf5/nrf5_libc.c
+++ b/src/common/platforms/nrf5/nrf5_libc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if (CS_PLATFORM == CS_P_NRF51 || CS_PLATFORM == CS_P_NRF52) && \
diff --git a/src/common/platforms/pic32/pic32_net_if.c b/src/common/platforms/pic32/pic32_net_if.c
index d0e67e9af6c36955043791eb41fdbe6e474a6c0b..49618c57e87d09dbcc5ed503b56df75c39469e2b 100644
--- a/src/common/platforms/pic32/pic32_net_if.c
+++ b/src/common/platforms/pic32/pic32_net_if.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_ENABLE_NET_IF_PIC32
diff --git a/src/common/platforms/pic32/pic32_net_if.h b/src/common/platforms/pic32/pic32_net_if.h
index 2bf66ef6db0ee2de1f2c8a763f65d85099923ad9..52ae891dcfe8099cc0f7eb04686df49508b220fb 100644
--- a/src/common/platforms/pic32/pic32_net_if.h
+++ b/src/common/platforms/pic32/pic32_net_if.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PIC32_NET_IF_H_
diff --git a/src/common/platforms/platform_cc3100.h b/src/common/platforms/platform_cc3100.h
index ba07f2202497e8dea7673e6ebc007a237ef827b7..8e847fcfdc083ca30cbff55b4e4e900b578295c4 100644
--- a/src/common/platforms/platform_cc3100.h
+++ b/src/common/platforms/platform_cc3100.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3100_H_
diff --git a/src/common/platforms/platform_cc3200.h b/src/common/platforms/platform_cc3200.h
index 1c2033af76d6d637bcad7b14f7e8ad22789afe7a..00ef9fa386196f4d1e9e8461b495362e7f536974 100644
--- a/src/common/platforms/platform_cc3200.h
+++ b/src/common/platforms/platform_cc3200.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_
diff --git a/src/common/platforms/platform_cc3220.h b/src/common/platforms/platform_cc3220.h
index 6992e142f85a39389463b6a8651dc7a4164af1d6..c5336e33d52f10cadb60e753dfb0a2228fd897ec 100644
--- a/src/common/platforms/platform_cc3220.h
+++ b/src/common/platforms/platform_cc3220.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3220_H_
diff --git a/src/common/platforms/platform_esp32.h b/src/common/platforms/platform_esp32.h
index 4580f75aeb511cf4769fa98998e62b3f9100185b..b1af9da524dc519b2c3cb65433f35b3a7abc2b73 100644
--- a/src/common/platforms/platform_esp32.h
+++ b/src/common/platforms/platform_esp32.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP32_H_
diff --git a/src/common/platforms/platform_esp8266.h b/src/common/platforms/platform_esp8266.h
index b3971013dac404b7c3c60c9c74cb691791bdec2d..0428f0585ec536ddbc4511b37f268c1fac602c50 100644
--- a/src/common/platforms/platform_esp8266.h
+++ b/src/common/platforms/platform_esp8266.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_
diff --git a/src/common/platforms/platform_mbed.h b/src/common/platforms/platform_mbed.h
index ab3f5639a159fcf6bbfc9d5d215f7a811b08d935..5f37862a8ae2343e3c87e6338bfe874cafc1ae85 100644
--- a/src/common/platforms/platform_mbed.h
+++ b/src/common/platforms/platform_mbed.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_MBED_H_
diff --git a/src/common/platforms/platform_msp432.h b/src/common/platforms/platform_msp432.h
index d8cf16a18838fd8e87b9b40d439da33228db3f1e..d9c5e18338265a100cb57465ad85375912be5553 100644
--- a/src/common/platforms/platform_msp432.h
+++ b/src/common/platforms/platform_msp432.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_MSP432_H_
diff --git a/src/common/platforms/platform_nrf51.h b/src/common/platforms/platform_nrf51.h
index 55f89dda14e3d74ee0bedaa1341b78a74ebc3b6a..6f1357bd6566dae89dff6299b421733c70a2ca46 100644
--- a/src/common/platforms/platform_nrf51.h
+++ b/src/common/platforms/platform_nrf51.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
 #define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
diff --git a/src/common/platforms/platform_nrf52.h b/src/common/platforms/platform_nrf52.h
index 3516cf90fca1769df03db1555ae4b0710226dbe8..2b8b882fcc16187ec2818293b1497e08d03e6c6f 100644
--- a/src/common/platforms/platform_nrf52.h
+++ b/src/common/platforms/platform_nrf52.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
 #define CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
diff --git a/src/common/platforms/platform_nxp_kinetis.h b/src/common/platforms/platform_nxp_kinetis.h
index b4ffd53112a1f6cbdeca76a57a54b3551c86c7c2..d9265e91000a51a74c9c466d129a3b2f50bc548a 100644
--- a/src/common/platforms/platform_nxp_kinetis.h
+++ b/src/common/platforms/platform_nxp_kinetis.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_KINETIS_H_
diff --git a/src/common/platforms/platform_nxp_lpc.h b/src/common/platforms/platform_nxp_lpc.h
index cf9b7e70674609e049b9216f16238eab1eeca271..7bb12c5ee02ddff2f319cd0a704603dadda5bd5d 100644
--- a/src/common/platforms/platform_nxp_lpc.h
+++ b/src/common/platforms/platform_nxp_lpc.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_LPC_H_
diff --git a/src/common/platforms/platform_pic32.h b/src/common/platforms/platform_pic32.h
index b56802528309e36e7eda6b5ce68fade9ce6b3ebe..f2072c3e1631822eef5fd861d4ea3dea98f148c8 100644
--- a/src/common/platforms/platform_pic32.h
+++ b/src/common/platforms/platform_pic32.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_
diff --git a/src/common/platforms/platform_stm32.h b/src/common/platforms/platform_stm32.h
index ece78c820fbfbb54cc924033648628492ca48cbb..6b937569e44c0ffd812292047a2eb1605762dccd 100644
--- a/src/common/platforms/platform_stm32.h
+++ b/src/common/platforms/platform_stm32.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_STM32_H_
diff --git a/src/common/platforms/platform_tm4c129.h b/src/common/platforms/platform_tm4c129.h
index 5e87b948d932ebcc3c156935ab46a9cb78db8c8f..dc75d79db2107ed6374d94381e30b8df3d618178 100644
--- a/src/common/platforms/platform_tm4c129.h
+++ b/src/common/platforms/platform_tm4c129.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_PLATFORM_TM4C129_H_
diff --git a/src/common/platforms/simplelink/cs_simplelink.h b/src/common/platforms/simplelink/cs_simplelink.h
index ed6afa2e2692213cd2b3609f1436f1a5917fd983..2b41541027508fcf49b7c4acb0424ca4071b022d 100644
--- a/src/common/platforms/simplelink/cs_simplelink.h
+++ b/src/common/platforms/simplelink/cs_simplelink.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_SIMPLELINK_CS_SIMPLELINK_H_
diff --git a/src/common/platforms/simplelink/sl_fs.c b/src/common/platforms/simplelink/sl_fs.c
index fc0934298cc7d062f0def23a6c9603d50fa142dc..bc055c1f550380ae267a0518488c12bbfd12c4c5 100644
--- a/src/common/platforms/simplelink/sl_fs.c
+++ b/src/common/platforms/simplelink/sl_fs.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_NET_IF == MG_NET_IF_SIMPLELINK && \
diff --git a/src/common/platforms/simplelink/sl_fs_slfs.c b/src/common/platforms/simplelink/sl_fs_slfs.c
index 2754b6bfde09db89d406b649116d10aa7290bf3d..8170310be55684d66db0a6c1b0c5657974328da1 100644
--- a/src/common/platforms/simplelink/sl_fs_slfs.c
+++ b/src/common/platforms/simplelink/sl_fs_slfs.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 /* Standard libc interface to TI SimpleLink FS. */
diff --git a/src/common/platforms/simplelink/sl_fs_slfs.h b/src/common/platforms/simplelink/sl_fs_slfs.h
index 0d8a4b1c33df2ec258fc6fe6703040c91352a564..eb909c1bc5a8e44313bd838d450d394787bc2bcf 100644
--- a/src/common/platforms/simplelink/sl_fs_slfs.h
+++ b/src/common/platforms/simplelink/sl_fs_slfs.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_SIMPLELINK_SL_FS_SLFS_H_
diff --git a/src/common/platforms/simplelink/sl_net_if.c b/src/common/platforms/simplelink/sl_net_if.c
index fcc5632b2680474c8d3355eef1d1a995657bae95..1a000ce7f8d445e48766f5ebb0cb32c73b59d262 100644
--- a/src/common/platforms/simplelink/sl_net_if.c
+++ b/src/common/platforms/simplelink/sl_net_if.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/platforms/simplelink/sl_net_if.h"
diff --git a/src/common/platforms/simplelink/sl_net_if.h b/src/common/platforms/simplelink/sl_net_if.h
index aa49d5de01178ad3edd5312f9c9cea7ab7eff6d4..c72bd28b18e76ab7bc35aac22f9b76aaf68ef411 100644
--- a/src/common/platforms/simplelink/sl_net_if.h
+++ b/src/common/platforms/simplelink/sl_net_if.h
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_PLATFORMS_SIMPLELINK_SL_NET_IF_H_
diff --git a/src/common/platforms/simplelink/sl_socket.c b/src/common/platforms/simplelink/sl_socket.c
index e4a0c26a84deb9e8efea4f2354bff1b03f6cc625..101fb636e7cd23f4b8bd1373587184196a28aaad 100644
--- a/src/common/platforms/simplelink/sl_socket.c
+++ b/src/common/platforms/simplelink/sl_socket.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_NET_IF == MG_NET_IF_SIMPLELINK
diff --git a/src/common/platforms/simplelink/sl_ssl_if.c b/src/common/platforms/simplelink/sl_ssl_if.c
index 0cd9c25b80a5efd0cd0bb31f202fed221ea6a9e6..6e4daa6e1861d14ad55ec1e0663ea3f60f607264 100644
--- a/src/common/platforms/simplelink/sl_ssl_if.c
+++ b/src/common/platforms/simplelink/sl_ssl_if.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #if MG_ENABLE_SSL && MG_SSL_IF == MG_SSL_IF_SIMPLELINK
diff --git a/src/common/platforms/wince/wince_libc.c b/src/common/platforms/wince/wince_libc.c
index b385fde78e4fec22e0284080c65da2ebce24f92b..c0f5192832611e49c34a0ec4b2228ce0afaec0b3 100644
--- a/src/common/platforms/wince/wince_libc.c
+++ b/src/common/platforms/wince/wince_libc.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifdef WINCE
diff --git a/src/common/platforms/windows/windows_direct.c b/src/common/platforms/windows/windows_direct.c
index 89328998fb5a72ced488e232d1be71263bc33176..796a416d907864097319cf24b776ca2e41c8f0c7 100644
--- a/src/common/platforms/windows/windows_direct.c
+++ b/src/common/platforms/windows/windows_direct.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2017 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifdef _WIN32
diff --git a/src/common/test_main.c b/src/common/test_main.c
index 53116d92f920a1a060f4320ed9374e6df3124b99..5057cbc92d5b119686f1bb5770fc97fee05eaede 100644
--- a/src/common/test_main.c
+++ b/src/common/test_main.c
@@ -1,6 +1,18 @@
 /*
  * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/cs_dbg.h"
diff --git a/src/common/test_main.h b/src/common/test_main.h
index 6b6f5f397c49c7fe7f82ab365b71d13c8c9f7189..915b560a1b47a3b0331b4bdd1e795a11270b6b7d 100644
--- a/src/common/test_main.h
+++ b/src/common/test_main.h
@@ -1,6 +1,18 @@
 /*
  * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_TEST_MAIN_H_
diff --git a/src/common/test_util.c b/src/common/test_util.c
index 705a12fbe2abc6afc884743167bf5ad5b0c31bd7..f2782f83c3e6bca7c14e48465cf67255a8440d3c 100644
--- a/src/common/test_util.c
+++ b/src/common/test_util.c
@@ -1,6 +1,18 @@
 /*
- * Copyright (c) 2014-2016 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #include "common/test_util.h"
diff --git a/src/common/test_util.h b/src/common/test_util.h
index 60618f10ebe65b7a6d05e09fdb9737c9382e0869..7af3ab5e0ee24a364483e73569b0a1ebf9db4a56 100644
--- a/src/common/test_util.h
+++ b/src/common/test_util.h
@@ -1,18 +1,18 @@
 /*
- * Copyright (c) 2015 Cesanta Software Limited
+ * Copyright (c) 2014-2018 Cesanta Software Limited
  * All rights reserved
- * This software is dual-licensed: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. For the terms of this
- * license, see <http://www.gnu.org/licenses/>.
  *
- * You are free to use this software under the terms of the GNU General
- * Public License, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
+ * Licensed under the Apache License, Version 2.0 (the ""License"");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * Alternatively, you can license this software under a commercial
- * license, as set out in <https://www.cesanta.com/license>.
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an ""AS IS"" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #ifndef CS_COMMON_TEST_UTIL_H_