Scott Baker | 611f6bd | 2019-10-18 13:45:19 -0700 | [diff] [blame] | 1 | package kadmin |
| 2 | |
| 3 | import ( |
| 4 | "github.com/jcmturner/gofork/encoding/asn1" |
| 5 | "gopkg.in/jcmturner/gokrb5.v7/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 | } |