diff options
Diffstat (limited to 'crypto/ct/ct_sct.c')
-rw-r--r-- | crypto/ct/ct_sct.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crypto/ct/ct_sct.c b/crypto/ct/ct_sct.c index 67adcfaa52..2f0fef7833 100644 --- a/crypto/ct/ct_sct.c +++ b/crypto/ct/ct_sct.c @@ -65,10 +65,11 @@ int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type) case CT_LOG_ENTRY_TYPE_PRECERT: sct->entry_type = entry_type; return 1; - default: - CTerr(CT_F_SCT_SET_LOG_ENTRY_TYPE, CT_R_UNSUPPORTED_ENTRY_TYPE); - return 0; + case CT_LOG_ENTRY_TYPE_NOT_SET: + break; } + CTerr(CT_F_SCT_SET_LOG_ENTRY_TYPE, CT_R_UNSUPPORTED_ENTRY_TYPE); + return 0; } int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len) @@ -269,9 +270,11 @@ int SCT_set_source(SCT *sct, sct_source_t source) return SCT_set_log_entry_type(sct, CT_LOG_ENTRY_TYPE_X509); case SCT_SOURCE_X509V3_EXTENSION: return SCT_set_log_entry_type(sct, CT_LOG_ENTRY_TYPE_PRECERT); - default: /* if we aren't sure, leave the log entry type alone */ - return 1; + case SCT_SOURCE_UNKNOWN: + break; } + /* if we aren't sure, leave the log entry type alone */ + return 1; } sct_validation_status_t SCT_get_validation_status(const SCT *sct) |