Commit 6c2a37b
remove complicated key saving process and instead
leave the encryption key for wolfBoot_success to erase.
FINAL_SWAP was also stopping the case where the partition was put into testing before the update sector status flags could be erased. now, don't erase the update sector flags. instead put the update partition in IMG_STATE_FINAL_FLAGS state before putting the boot partition in IMG_STATE_TESTING. Then only erase the update sector flags on wolfBoot_update_trigger. under this scheme, the sector flags are intact if the power failed before we could set IMG_STATE_TESTING but are wiped if we do need to swap over after after wolfBoot_success fails to be called1 parent 2298da2 commit 6c2a37b
File tree
7 files changed
+87
-315
lines changed- include
- wolfboot
- lib
- src
7 files changed
+87
-315
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
619 | | - | |
| 619 | + | |
620 | 620 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 621 | + | |
| 622 | + | |
631 | 623 | | |
632 | 624 | | |
633 | 625 | | |
| |||
665 | 657 | | |
666 | 658 | | |
667 | 659 | | |
668 | | - | |
| 660 | + | |
669 | 661 | | |
670 | 662 | | |
671 | 663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | 319 | | |
321 | 320 | | |
322 | 321 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | 322 | | |
329 | 323 | | |
330 | 324 | | |
| |||
- .github/workflows/make-test-swtpm.yml+10-79
- .gitignore+3-5
- IDE/STM32CUBE/README.md-23
- IDE/STM32CUBE/default_conf.ftl-100
- IDE/STM32CUBE/include.am-8
- IDE/STM32CUBE/wolftpm_test.c-52
- IDE/STM32CUBE/wolftpm_test.h-38
- IDE/include.am-1
- README.md+2-2
- certs/certreq.sh+6-6
- certs/example-ecc256-key-pub.der
- certs/example-ecc256-key-pub.pem-4
- certs/example-ecc256-key.der
- certs/example-ecc256-key.pem-9
- certs/example-ecc384-key-pub.der
- certs/example-ecc384-key-pub.pem-5
- certs/example-ecc384-key.der
- certs/example-ecc384-key.pem-6
- certs/example-rsa-key.pem
- certs/example-rsa2048-key-pub.der
- certs/example-rsa2048-key-pub.pem-9
- certs/example-rsa2048-key.der
- certs/include.am+6-17
- certs/wolf-ca-ecc-cert.pem+11-11
- certs/wolf-ca-rsa-cert.pem+28-28
- configure.ac+1-2
- examples/README.md+40-10
- examples/attestation/activate_credential.c+2-2
- examples/attestation/make_credential.c+3-3
- examples/bench/bench.c+31-39
- examples/boot/README.md-84
- examples/boot/boot.h-37
- examples/boot/include.am-33
- examples/boot/secret_seal.c-317
- examples/boot/secret_unseal.c-379
- examples/boot/secure_rot.c-305
- examples/csr/csr.c+12-17
- examples/gpio/gpio_config.c+1-3
- examples/include.am-5
- examples/keygen/create_primary.c+4-4
- examples/keygen/external_import.c+18-61
- examples/keygen/keygen.c+10-10
- examples/keygen/keyimport.c+90-125
- examples/keygen/keyload.c+12-21
- examples/nvram/counter.c+14-27
- examples/nvram/include.am+15-8
- examples/nvram/nvram.h-1
- examples/nvram/policy_nv.c-307
- examples/nvram/read.c+13-39
- examples/nvram/seal_policy_auth_nv.c+296
- examples/nvram/seal_policy_auth_nv_external.c+343
- examples/nvram/store.c+12-36
- examples/pcr/extend.c+3-5
- examples/pcr/include.am+1-10
- examples/pcr/pcr.h-1
- examples/pcr/policy.c+30-2
- examples/pcr/policy_sign.c-412
- examples/pcr/quote.c+2-2
- examples/pkcs7/pkcs7.c+47-57
- examples/run_examples.sh-445
- examples/seal/include.am+12-3
- examples/seal/seal.c+3-2
- examples/seal/seal_policy_auth.c+359
- examples/seal/unseal.c+3-3
- examples/timestamp/clock_set.c+1-1
- examples/tls/tls_client.c+3-16
- examples/tls/tls_server.c+2-13
- examples/tpm_test.h-2
- examples/tpm_test_keys.c+43-171
- examples/tpm_test_keys.h+1-11
- examples/wrap/wrap_test.c+5-22
- hal/tpm_io.c+2-4
- src/tpm2.c+14-20
- src/tpm2_param_enc.c+11-7
- src/tpm2_tis.c+3-11
- src/tpm2_wrap.c+1.3k-1.2k
- tests/include.am+1-2
- tests/unit_tests.c-112
- wolftpm/tpm2.h+3-14
- wolftpm/tpm2_tis.h+3-7
- wolftpm/tpm2_types.h+6-18
- wolftpm/tpm2_wrap.h+215-295
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
745 | 744 | | |
746 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
747 | 749 | | |
748 | | - | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | 754 | | |
759 | 755 | | |
760 | 756 | | |
| |||
767 | 763 | | |
768 | 764 | | |
769 | 765 | | |
770 | | - | |
771 | 766 | | |
772 | 767 | | |
773 | 768 | | |
774 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
775 | 772 | | |
776 | 773 | | |
777 | 774 | | |
| |||
783 | 780 | | |
784 | 781 | | |
785 | 782 | | |
786 | | - | |
787 | | - | |
788 | 783 | | |
789 | 784 | | |
790 | | - | |
791 | 785 | | |
792 | 786 | | |
793 | 787 | | |
| |||
812 | 806 | | |
813 | 807 | | |
814 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
815 | 812 | | |
816 | 813 | | |
817 | 814 | | |
818 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | 1434 | | |
1452 | 1435 | | |
1453 | 1436 | | |
| |||
1463 | 1446 | | |
1464 | 1447 | | |
1465 | 1448 | | |
1466 | | - | |
1467 | 1449 | | |
1468 | 1450 | | |
1469 | 1451 | | |
1470 | 1452 | | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
1491 | | - | |
1492 | | - | |
1493 | | - | |
1494 | | - | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1495 | 1460 | | |
1496 | 1461 | | |
1497 | 1462 | | |
1498 | | - | |
| 1463 | + | |
1499 | 1464 | | |
1500 | 1465 | | |
1501 | 1466 | | |
| |||
1539 | 1504 | | |
1540 | 1505 | | |
1541 | 1506 | | |
1542 | | - | |
1543 | | - | |
| 1507 | + | |
| 1508 | + | |
1544 | 1509 | | |
1545 | 1510 | | |
1546 | 1511 | | |
1547 | 1512 | | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
1548 | 1517 | | |
1549 | 1518 | | |
1550 | 1519 | | |
| |||
1581 | 1550 | | |
1582 | 1551 | | |
1583 | 1552 | | |
1584 | | - | |
1585 | | - | |
| 1553 | + | |
| 1554 | + | |
1586 | 1555 | | |
1587 | 1556 | | |
1588 | 1557 | | |
1589 | 1558 | | |
1590 | 1559 | | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1591 | 1564 | | |
1592 | 1565 | | |
1593 | 1566 | | |
| |||
1703 | 1676 | | |
1704 | 1677 | | |
1705 | 1678 | | |
1706 | | - | |
1707 | | - | |
| 1679 | + | |
| 1680 | + | |
1708 | 1681 | | |
1709 | 1682 | | |
1710 | 1683 | | |
| |||
1739 | 1712 | | |
1740 | 1713 | | |
1741 | 1714 | | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
| 1715 | + | |
1745 | 1716 | | |
1746 | 1717 | | |
1747 | 1718 | | |
| |||
1772 | 1743 | | |
1773 | 1744 | | |
1774 | 1745 | | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
1791 | 1746 | | |
1792 | 1747 | | |
1793 | 1748 | | |
| |||
1934 | 1889 | | |
1935 | 1890 | | |
1936 | 1891 | | |
1937 | | - | |
1938 | | - | |
1939 | | - | |
1940 | | - | |
1941 | | - | |
1942 | | - | |
1943 | | - | |
1944 | | - | |
1945 | | - | |
1946 | | - | |
1947 | | - | |
1948 | | - | |
1949 | | - | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
1961 | | - | |
1962 | | - | |
1963 | | - | |
1964 | | - | |
1965 | | - | |
1966 | | - | |
1967 | | - | |
1968 | | - | |
1969 | | - | |
1970 | | - | |
1971 | | - | |
1972 | | - | |
0 commit comments