@@ -238,7 +238,9 @@ typedef struct {
238
238
/** Certificate structure. */
239
239
typedef struct {
240
240
const uint8_t * cert ; /**< Certificate pointer. */
241
+ const uint8_t * key ; /**< Key pointer. */
241
242
uint16_t cert_len ; /**< Certificate length. */
243
+ uint16_t key_len ; /**< Key length. */
242
244
} arm_certificate_entry_s ;
243
245
244
246
/** Certificate Revocation List structure. */
@@ -921,6 +923,37 @@ extern int8_t arm_network_trusted_certificate_add(const arm_certificate_entry_s
921
923
*/
922
924
extern int8_t arm_network_trusted_certificate_remove (const arm_certificate_entry_s * cert );
923
925
926
+ /**
927
+ * Remove trusted certificates
928
+ *
929
+ * This is used to remove all trusted root or intermediate certificates.
930
+ *
931
+ * \return 0 on success, negative on failure.
932
+ */
933
+ extern int8_t arm_network_trusted_certificates_remove (void );
934
+
935
+ /**
936
+ * Add own certificate
937
+ *
938
+ * This is used to add own certificate and private key.
939
+ * In case intermediate certificates are used, function can be called several times. Each call
940
+ * to the function adds a certificate to own certificate chain.
941
+ * Certificates are in bottom up order i.e. the top certificate is given last.
942
+ *
943
+ * \param cert Certificate.
944
+ * \return 0 on success, negative on failure.
945
+ */
946
+ extern int8_t arm_network_own_certificate_add (const arm_certificate_entry_s * cert );
947
+
948
+ /**
949
+ * Remove own certificates
950
+ *
951
+ * This is used to remove own certificates (chain).
952
+ *
953
+ * \return 0 on success, negative on failure.
954
+ */
955
+ extern int8_t arm_network_own_certificates_remove (void );
956
+
924
957
/**
925
958
* Add Certificate Revocation List
926
959
*
0 commit comments