-
Notifications
You must be signed in to change notification settings - Fork 6
/
WebEnrollmentResponse.go
42 lines (36 loc) · 1023 Bytes
/
WebEnrollmentResponse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package adcs
const (
// SUCCESS status
SUCCESS = 0
// PENDING status
PENDING = 1
// UNAUTHORIZED status
UNAUTHORIZED = 2
// FAIL status
FAIL = 3
// DENIED status
DENIED = 4
)
// WebEnrollmentResponse struct contains the parsed response from adcs
type WebEnrollmentResponse struct {
webenrollmentrequest WebEnrollmentRequest
certificatedata []byte
status int
requestid int
}
// GetCertData returns a byte array of the signed certificate
func (wer WebEnrollmentResponse) GetCertData() []byte {
return wer.certificatedata
}
// GetStatus returns a const reflecting the status of the signing request
func (wer WebEnrollmentResponse) GetStatus() int {
return wer.status
}
// GetRequestID will return the request ID
func (wer WebEnrollmentResponse) GetRequestID() int {
return wer.requestid
}
// GetRequestURL will reututn the url that the request was issued against.
func (wer WebEnrollmentResponse) GetRequestURL() string {
return wer.webenrollmentrequest.GetServer().URL
}