khenaidoo | d948f77 | 2021-08-11 17:49:24 -0400 | [diff] [blame] | 1 | package kadmin |
| 2 | |
| 3 | import ( |
| 4 | "github.com/jcmturner/gofork/encoding/asn1" |
| 5 | "github.com/jcmturner/gokrb5/v8/types" |
| 6 | ) |
| 7 | |
| 8 | // ChangePasswdData is the payload to a password change message. |
| 9 | type ChangePasswdData struct { |
| 10 | NewPasswd []byte `asn1:"explicit,tag:0"` |
| 11 | TargName types.PrincipalName `asn1:"explicit,optional,tag:1"` |
| 12 | TargRealm string `asn1:"generalstring,optional,explicit,tag:2"` |
| 13 | } |
| 14 | |
| 15 | // Marshal ChangePasswdData into a byte slice. |
| 16 | func (c *ChangePasswdData) Marshal() ([]byte, error) { |
| 17 | b, err := asn1.Marshal(*c) |
| 18 | if err != nil { |
| 19 | return []byte{}, err |
| 20 | } |
| 21 | //b = asn1tools.AddASNAppTag(b, asnAppTag.) |
| 22 | return b, nil |
| 23 | } |