blob: 2d68eda1924c2007b4539ce4389389ceacb3a542 [file] [log] [blame]
khenaidoo7d3c5582021-08-11 18:09:44 -04001package kadmin
2
3import (
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.
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}