blob: a3e2efdd9cc1c57b397a08aa49b2163931371193 [file] [log] [blame]
Scott Baker8461e152019-10-01 14:44:30 -07001package kadmin
2
3import (
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.
9type 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.
16func (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}