From 122ca3016cdc12ff61b2c2e2edd8df9cf2a17dc4 Mon Sep 17 00:00:00 2001
From: Paul Duncan <pabs@pablotron.org>
Date: Sat, 19 Mar 2022 01:10:35 -0400
Subject: feed: support multiple cvss v2 authentication value

---
 feed/v2authentication.go        | 3 +++
 feed/v2authentication_string.go | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'feed')

diff --git a/feed/v2authentication.go b/feed/v2authentication.go
index 853954f..56af521 100644
--- a/feed/v2authentication.go
+++ b/feed/v2authentication.go
@@ -13,6 +13,7 @@ type V2Authentication byte
 const (
   V2AuthNone V2Authentication = iota // NONE
   V2AuthSingle // SINGLE
+  V2AuthMultiple // MULTIPLE
 )
 
 // Unmarshal CVSS V2 authentication from JSON.
@@ -29,6 +30,8 @@ func (me *V2Authentication) UnmarshalJSON(b []byte) error {
     *me = V2AuthNone
   case "SINGLE":
     *me = V2AuthSingle
+  case "MULTIPLE":
+    *me = V2AuthMultiple
   default:
     // return error
     return fmt.Errorf("unknown CVSS v2 authentication: %s", s)
diff --git a/feed/v2authentication_string.go b/feed/v2authentication_string.go
index 856c808..edf0759 100644
--- a/feed/v2authentication_string.go
+++ b/feed/v2authentication_string.go
@@ -10,11 +10,12 @@ func _() {
 	var x [1]struct{}
 	_ = x[V2AuthNone-0]
 	_ = x[V2AuthSingle-1]
+	_ = x[V2AuthMultiple-2]
 }
 
-const _V2Authentication_name = "NONESINGLE"
+const _V2Authentication_name = "NONESINGLEMULTIPLE"
 
-var _V2Authentication_index = [...]uint8{0, 4, 10}
+var _V2Authentication_index = [...]uint8{0, 4, 10, 18}
 
 func (i V2Authentication) String() string {
 	if i >= V2Authentication(len(_V2Authentication_index)-1) {
-- 
cgit v1.2.3