#include "pkix_interface.h"
#include "hw_emul/hw_interface.h"
#include "oxmverifycommon.h"
+#include "casecurityinterface.h"
#define TAG "SAMPLE_MANUFACTURER_CERT"
return OC_STACK_OK;
}
+void confirmNoCertCB(CACertificateVerificationStatus_t status)
+{
+ if (CA_CERTIFICATE_VERIFY_SUCCESS_MUTUAL == status)
+ {
+ printf(" > Peer certificate verification successful");
+ }
+ else if (CA_CERTIFICATE_VERIFY_NO_CERT == status)
+ {
+ printf(" > Peer has not provided certificate\n");
+ }
+ else if (CA_CERTIFICATE_VERIFY_FAILED == status)
+ {
+ printf(" > Peer certificate verification failed\n");
+ }
+ return;
+}
+
+void informOxmSelCB(OicSecOxm_t oxmSel)\r
+{\r
+ printf(" > OXM selected: 0x%x\n", oxmSel);\r
+}\r
+\r
FILE* server_fopen(const char *path, const char *mode)
{
(void)path;
OCPersistentStorage ps = {server_fopen, fread, fwrite, fclose, unlink, NULL, NULL};
SetUserConfirmCB(NULL, confirmCB);
+ SetInformOxmSelCB(informOxmSelCB);
+ CAsetCertificateVerificationCallback(confirmNoCertCB);
OCRegisterPersistentStorageHandler(&ps);