summaryrefslogtreecommitdiff
path: root/lib/libkrb5/generated
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkrb5/generated')
-rw-r--r--lib/libkrb5/generated/asn1_AD_AND_OR.c162
-rw-r--r--lib/libkrb5/generated/asn1_AD_IF_RELEVANT.c70
-rw-r--r--lib/libkrb5/generated/asn1_AD_KDCIssued.c273
-rw-r--r--lib/libkrb5/generated/asn1_AD_MANDATORY_FOR_KDC.c70
-rw-r--r--lib/libkrb5/generated/asn1_APOptions.c12
-rw-r--r--lib/libkrb5/generated/asn1_AP_REP.c22
-rw-r--r--lib/libkrb5/generated/asn1_AP_REQ.c30
-rw-r--r--lib/libkrb5/generated/asn1_AS_REP.c6
-rw-r--r--lib/libkrb5/generated/asn1_AS_REQ.c6
-rw-r--r--lib/libkrb5/generated/asn1_AUTHDATA_TYPE.c69
-rw-r--r--lib/libkrb5/generated/asn1_Authenticator.c50
-rw-r--r--lib/libkrb5/generated/asn1_AuthorizationData.c22
-rw-r--r--lib/libkrb5/generated/asn1_CBCParameter.c70
-rw-r--r--lib/libkrb5/generated/asn1_CKSUMTYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_ChangePasswdDataMS.c20
-rw-r--r--lib/libkrb5/generated/asn1_Checksum.c14
-rw-r--r--lib/libkrb5/generated/asn1_ENCTYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_ETYPE_INFO.c10
-rw-r--r--lib/libkrb5/generated/asn1_ETYPE_INFO2.c115
-rw-r--r--lib/libkrb5/generated/asn1_ETYPE_INFO2_ENTRY.c230
-rw-r--r--lib/libkrb5/generated/asn1_ETYPE_INFO_ENTRY.c20
-rw-r--r--lib/libkrb5/generated/asn1_EncAPRepPart.c28
-rw-r--r--lib/libkrb5/generated/asn1_EncASRepPart.c6
-rw-r--r--lib/libkrb5/generated/asn1_EncKDCRepPart.c58
-rw-r--r--lib/libkrb5/generated/asn1_EncKrbCredPart.c47
-rw-r--r--lib/libkrb5/generated/asn1_EncKrbPrivPart.c39
-rw-r--r--lib/libkrb5/generated/asn1_EncTGSRepPart.c6
-rw-r--r--lib/libkrb5/generated/asn1_EncTicketPart.c58
-rw-r--r--lib/libkrb5/generated/asn1_EncryptedData.c19
-rw-r--r--lib/libkrb5/generated/asn1_EncryptionKey.c14
-rw-r--r--lib/libkrb5/generated/asn1_EtypeList.c114
-rw-r--r--lib/libkrb5/generated/asn1_Event.c15
-rw-r--r--lib/libkrb5/generated/asn1_GENERATION.c30
-rw-r--r--lib/libkrb5/generated/asn1_HDBFlags.c12
-rw-r--r--lib/libkrb5/generated/asn1_HostAddress.c14
-rw-r--r--lib/libkrb5/generated/asn1_HostAddresses.c10
-rw-r--r--lib/libkrb5/generated/asn1_KDCOptions.c12
-rw-r--r--lib/libkrb5/generated/asn1_KDC_REP.c35
-rw-r--r--lib/libkrb5/generated/asn1_KDC_REQ.c23
-rw-r--r--lib/libkrb5/generated/asn1_KDC_REQ_BODY.c78
-rw-r--r--lib/libkrb5/generated/asn1_KRB_CRED.c34
-rw-r--r--lib/libkrb5/generated/asn1_KRB_ERROR.c68
-rw-r--r--lib/libkrb5/generated/asn1_KRB_PRIV.c22
-rw-r--r--lib/libkrb5/generated/asn1_KRB_SAFE.c26
-rw-r--r--lib/libkrb5/generated/asn1_KRB_SAFE_BODY.c35
-rw-r--r--lib/libkrb5/generated/asn1_KerberosString.c70
-rw-r--r--lib/libkrb5/generated/asn1_KerberosTime.c2
-rw-r--r--lib/libkrb5/generated/asn1_Key.c26
-rw-r--r--lib/libkrb5/generated/asn1_KrbCredInfo.c60
-rw-r--r--lib/libkrb5/generated/asn1_LR_TYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_LastReq.c22
-rw-r--r--lib/libkrb5/generated/asn1_MESSAGE_TYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_METHOD_DATA.c10
-rw-r--r--lib/libkrb5/generated/asn1_NAME_TYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_PADATA_TYPE.c2
-rw-r--r--lib/libkrb5/generated/asn1_PA_DATA.c14
-rw-r--r--lib/libkrb5/generated/asn1_PA_ENC_SAM_RESPONSE_ENC.c174
-rw-r--r--lib/libkrb5/generated/asn1_PA_ENC_TS_ENC.c15
-rw-r--r--lib/libkrb5/generated/asn1_PA_PAC_REQUEST.c119
-rw-r--r--lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2.c208
-rw-r--r--lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2_BODY.c576
-rw-r--r--lib/libkrb5/generated/asn1_PA_SAM_REDIRECT.c70
-rw-r--r--lib/libkrb5/generated/asn1_PA_SAM_RESPONSE_2.c302
-rw-r--r--lib/libkrb5/generated/asn1_PA_SAM_TYPE.c69
-rw-r--r--lib/libkrb5/generated/asn1_Principal.c14
-rw-r--r--lib/libkrb5/generated/asn1_PrincipalName.c22
-rw-r--r--lib/libkrb5/generated/asn1_RC2CBCParameter.c162
-rw-r--r--lib/libkrb5/generated/asn1_Realm.c2
-rw-r--r--lib/libkrb5/generated/asn1_SAMFlags.c126
-rw-r--r--lib/libkrb5/generated/asn1_Salt.c20
-rw-r--r--lib/libkrb5/generated/asn1_TGS_REP.c6
-rw-r--r--lib/libkrb5/generated/asn1_TGS_REQ.c6
-rw-r--r--lib/libkrb5/generated/asn1_Ticket.c26
-rw-r--r--lib/libkrb5/generated/asn1_TicketFlags.c12
-rw-r--r--lib/libkrb5/generated/asn1_TransitedEncoding.c14
-rw-r--r--lib/libkrb5/generated/asn1_UNSIGNED.c2
-rw-r--r--lib/libkrb5/generated/asn1_err.c10
-rw-r--r--lib/libkrb5/generated/asn1_err.h11
-rw-r--r--lib/libkrb5/generated/asn1_hdb_entry.c107
-rw-r--r--lib/libkrb5/generated/hdb_asn1.h50
-rw-r--r--lib/libkrb5/generated/hdb_err.c10
-rw-r--r--lib/libkrb5/generated/hdb_err.h11
-rw-r--r--lib/libkrb5/generated/heim_err.c22
-rw-r--r--lib/libkrb5/generated/heim_err.h18
-rw-r--r--lib/libkrb5/generated/k524_err.c10
-rw-r--r--lib/libkrb5/generated/k524_err.h11
-rw-r--r--lib/libkrb5/generated/krb5_asn1.h457
-rw-r--r--lib/libkrb5/generated/krb5_err.c113
-rw-r--r--lib/libkrb5/generated/krb5_err.h97
89 files changed, 4390 insertions, 772 deletions
diff --git a/lib/libkrb5/generated/asn1_AD_AND_OR.c b/lib/libkrb5/generated/asn1_AD_AND_OR.c
new file mode 100644
index 00000000000..df184c27eab
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_AD_AND_OR.c
@@ -0,0 +1,162 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_AD_AND_OR(unsigned char *p, size_t len, const AD_AND_OR *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_AuthorizationData(p, len, &(data)->elements, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->condition_count, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_AD_AND_OR(const unsigned char *p, size_t len, AD_AND_OR *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->condition_count, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_AuthorizationData(p, len, &(data)->elements, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_AD_AND_OR(data);
+return e;
+}
+
+void
+free_AD_AND_OR(AD_AND_OR *data)
+{
+free_AuthorizationData(&(data)->elements);
+}
+
+size_t
+length_AD_AND_OR(const AD_AND_OR *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->condition_count);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_AuthorizationData(&(data)->elements);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_AD_AND_OR(const AD_AND_OR *from, AD_AND_OR *to)
+{
+*(&(to)->condition_count) = *(&(from)->condition_count);
+if(copy_AuthorizationData(&(from)->elements, &(to)->elements)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_AD_IF_RELEVANT.c b/lib/libkrb5/generated/asn1_AD_IF_RELEVANT.c
new file mode 100644
index 00000000000..c19970603d5
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_AD_IF_RELEVANT.c
@@ -0,0 +1,70 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_AD_IF_RELEVANT(unsigned char *p, size_t len, const AD_IF_RELEVANT *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_AuthorizationData(p, len, data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_AD_IF_RELEVANT(const unsigned char *p, size_t len, AD_IF_RELEVANT *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_AuthorizationData(p, len, data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_AD_IF_RELEVANT(data);
+return e;
+}
+
+void
+free_AD_IF_RELEVANT(AD_IF_RELEVANT *data)
+{
+free_AuthorizationData(data);
+}
+
+size_t
+length_AD_IF_RELEVANT(const AD_IF_RELEVANT *data)
+{
+size_t ret = 0;
+ret += length_AuthorizationData(data);
+return ret;
+}
+
+int
+copy_AD_IF_RELEVANT(const AD_IF_RELEVANT *from, AD_IF_RELEVANT *to)
+{
+if(copy_AuthorizationData(from, to)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_AD_KDCIssued.c b/lib/libkrb5/generated/asn1_AD_KDCIssued.c
new file mode 100644
index 00000000000..905a3854d69
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_AD_KDCIssued.c
@@ -0,0 +1,273 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_AD_KDCIssued(unsigned char *p, size_t len, const AD_KDCIssued *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_AuthorizationData(p, len, &(data)->elements, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
+BACK;
+ret += oldret;
+}
+if((data)->i_sname)
+{
+int oldret = ret;
+ret = 0;
+e = encode_PrincipalName(p, len, (data)->i_sname, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
+BACK;
+ret += oldret;
+}
+if((data)->i_realm)
+{
+int oldret = ret;
+ret = 0;
+e = encode_Realm(p, len, (data)->i_realm, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_Checksum(p, len, &(data)->ad_checksum, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_AD_KDCIssued(const unsigned char *p, size_t len, AD_KDCIssued *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_Checksum(p, len, &(data)->ad_checksum, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+(data)->i_realm = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->i_realm = malloc(sizeof(*(data)->i_realm));
+if((data)->i_realm == NULL) return ENOMEM;
+e = decode_Realm(p, len, (data)->i_realm, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
+if (e)
+(data)->i_sname = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->i_sname = malloc(sizeof(*(data)->i_sname));
+if((data)->i_sname == NULL) return ENOMEM;
+e = decode_PrincipalName(p, len, (data)->i_sname, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_AuthorizationData(p, len, &(data)->elements, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_AD_KDCIssued(data);
+return e;
+}
+
+void
+free_AD_KDCIssued(AD_KDCIssued *data)
+{
+free_Checksum(&(data)->ad_checksum);
+if((data)->i_realm) {
+free_Realm((data)->i_realm);
+free((data)->i_realm);
+(data)->i_realm = NULL;
+}
+if((data)->i_sname) {
+free_PrincipalName((data)->i_sname);
+free((data)->i_sname);
+(data)->i_sname = NULL;
+}
+free_AuthorizationData(&(data)->elements);
+}
+
+size_t
+length_AD_KDCIssued(const AD_KDCIssued *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_Checksum(&(data)->ad_checksum);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->i_realm){
+int oldret = ret;
+ret = 0;
+ret += length_Realm((data)->i_realm);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->i_sname){
+int oldret = ret;
+ret = 0;
+ret += length_PrincipalName((data)->i_sname);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_AuthorizationData(&(data)->elements);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_AD_KDCIssued(const AD_KDCIssued *from, AD_KDCIssued *to)
+{
+if(copy_Checksum(&(from)->ad_checksum, &(to)->ad_checksum)) return ENOMEM;
+if((from)->i_realm) {
+(to)->i_realm = malloc(sizeof(*(to)->i_realm));
+if((to)->i_realm == NULL) return ENOMEM;
+if(copy_Realm((from)->i_realm, (to)->i_realm)) return ENOMEM;
+}else
+(to)->i_realm = NULL;
+if((from)->i_sname) {
+(to)->i_sname = malloc(sizeof(*(to)->i_sname));
+if((to)->i_sname == NULL) return ENOMEM;
+if(copy_PrincipalName((from)->i_sname, (to)->i_sname)) return ENOMEM;
+}else
+(to)->i_sname = NULL;
+if(copy_AuthorizationData(&(from)->elements, &(to)->elements)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_AD_MANDATORY_FOR_KDC.c b/lib/libkrb5/generated/asn1_AD_MANDATORY_FOR_KDC.c
new file mode 100644
index 00000000000..d06f69ee307
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_AD_MANDATORY_FOR_KDC.c
@@ -0,0 +1,70 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_AD_MANDATORY_FOR_KDC(unsigned char *p, size_t len, const AD_MANDATORY_FOR_KDC *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_AuthorizationData(p, len, data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_AD_MANDATORY_FOR_KDC(const unsigned char *p, size_t len, AD_MANDATORY_FOR_KDC *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_AuthorizationData(p, len, data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_AD_MANDATORY_FOR_KDC(data);
+return e;
+}
+
+void
+free_AD_MANDATORY_FOR_KDC(AD_MANDATORY_FOR_KDC *data)
+{
+free_AuthorizationData(data);
+}
+
+size_t
+length_AD_MANDATORY_FOR_KDC(const AD_MANDATORY_FOR_KDC *data)
+{
+size_t ret = 0;
+ret += length_AuthorizationData(data);
+return ret;
+}
+
+int
+copy_AD_MANDATORY_FOR_KDC(const AD_MANDATORY_FOR_KDC *from, AD_MANDATORY_FOR_KDC *to)
+{
+if(copy_AuthorizationData(from, to)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_APOptions.c b/lib/libkrb5/generated/asn1_APOptions.c
index 3eda096a9f5..6ebb130f24e 100644
--- a/lib/libkrb5/generated/asn1_APOptions.c
+++ b/lib/libkrb5/generated/asn1_APOptions.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -38,7 +38,7 @@ len -= 2;
ret += 2;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, PRIM,UT_BitString, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, PRIM,UT_BitString, &l);
BACK;
*size = ret;
return 0;
@@ -55,7 +55,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, PRIM, UT_BitString,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, PRIM, UT_BitString,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -113,10 +113,14 @@ APOptions int2APOptions(unsigned n)
return flags;
}
-struct units APOptions_units[] = {
+static struct units APOptions_units[] = {
{"mutual_required", 1U << 2},
{"use_session_key", 1U << 1},
{"reserved", 1U << 0},
{NULL, 0}
};
+const struct units * asn1_APOptions_units(void){
+return APOptions_units;
+}
+
diff --git a/lib/libkrb5/generated/asn1_AP_REP.c b/lib/libkrb5/generated/asn1_AP_REP.c
index 1ffcc8ee044..dbd5388c721 100644
--- a/lib/libkrb5/generated/asn1_AP_REP.c
+++ b/lib/libkrb5/generated/asn1_AP_REP.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->enc_part, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -44,13 +44,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 15, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 15, &l);
BACK;
*size = ret;
return 0;
@@ -67,13 +67,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 15, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 15, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -82,7 +82,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -108,7 +108,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -134,7 +134,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_AP_REQ.c b/lib/libkrb5/generated/asn1_AP_REQ.c
index adebca92306..e378e9ab7df 100644
--- a/lib/libkrb5/generated/asn1_AP_REQ.c
+++ b/lib/libkrb5/generated/asn1_AP_REQ.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->authenticator, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_Ticket(p, len, &(data)->ticket, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -44,7 +44,7 @@ int oldret = ret;
ret = 0;
e = encode_APOptions(p, len, &(data)->ap_options, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -53,7 +53,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -62,13 +62,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 14, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 14, &l);
BACK;
*size = ret;
return 0;
@@ -85,13 +85,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 14, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 14, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -100,7 +100,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -126,7 +126,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -152,7 +152,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -178,7 +178,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
@@ -204,7 +204,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_AS_REP.c b/lib/libkrb5/generated/asn1_AS_REP.c
index e0bcc901c10..940d21fc316 100644
--- a/lib/libkrb5/generated/asn1_AS_REP.c
+++ b/lib/libkrb5/generated/asn1_AS_REP.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_KDC_REP(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 11, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 11, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 11, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 11, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_AS_REQ.c b/lib/libkrb5/generated/asn1_AS_REQ.c
index 233f1c4a2c1..41f0dad3831 100644
--- a/lib/libkrb5/generated/asn1_AS_REQ.c
+++ b/lib/libkrb5/generated/asn1_AS_REQ.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_KDC_REQ(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 10, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 10, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 10, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_AUTHDATA_TYPE.c b/lib/libkrb5/generated/asn1_AUTHDATA_TYPE.c
new file mode 100644
index 00000000000..f6b20005758
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_AUTHDATA_TYPE.c
@@ -0,0 +1,69 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_AUTHDATA_TYPE(unsigned char *p, size_t len, const AUTHDATA_TYPE *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_integer(p, len, (const int*)data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_AUTHDATA_TYPE(const unsigned char *p, size_t len, AUTHDATA_TYPE *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_integer(p, len, (int*)data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_AUTHDATA_TYPE(data);
+return e;
+}
+
+void
+free_AUTHDATA_TYPE(AUTHDATA_TYPE *data)
+{
+}
+
+size_t
+length_AUTHDATA_TYPE(const AUTHDATA_TYPE *data)
+{
+size_t ret = 0;
+ret += length_integer((const int*)data);
+return ret;
+}
+
+int
+copy_AUTHDATA_TYPE(const AUTHDATA_TYPE *from, AUTHDATA_TYPE *to)
+{
+*(to) = *(from);
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_Authenticator.c b/lib/libkrb5/generated/asn1_Authenticator.c
index a96cdfcad74..b74037bdade 100644
--- a/lib/libkrb5/generated/asn1_Authenticator.c
+++ b/lib/libkrb5/generated/asn1_Authenticator.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_AuthorizationData(p, len, (data)->authorization_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_UNSIGNED(p, len, (data)->seq_number, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, (data)->subkey, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -56,7 +56,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->ctime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -65,7 +65,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->cusec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -75,7 +75,7 @@ int oldret = ret;
ret = 0;
e = encode_Checksum(p, len, (data)->cksum, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -84,7 +84,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->cname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -93,7 +93,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->crealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -102,13 +102,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->authenticator_vno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 2, &l);
BACK;
*size = ret;
return 0;
@@ -125,13 +125,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 2, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 2, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -140,7 +140,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -166,7 +166,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -192,7 +192,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -218,7 +218,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->cksum = NULL;
else {
@@ -246,7 +246,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -272,7 +272,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
return e;
else {
@@ -298,7 +298,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->subkey = NULL;
else {
@@ -326,7 +326,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
(data)->seq_number = NULL;
else {
@@ -354,7 +354,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->authorization_data = NULL;
else {
@@ -404,19 +404,23 @@ free_PrincipalName(&(data)->cname);
if((data)->cksum) {
free_Checksum((data)->cksum);
free((data)->cksum);
+(data)->cksum = NULL;
}
free_KerberosTime(&(data)->ctime);
if((data)->subkey) {
free_EncryptionKey((data)->subkey);
free((data)->subkey);
+(data)->subkey = NULL;
}
if((data)->seq_number) {
free_UNSIGNED((data)->seq_number);
free((data)->seq_number);
+(data)->seq_number = NULL;
}
if((data)->authorization_data) {
free_AuthorizationData((data)->authorization_data);
free((data)->authorization_data);
+(data)->authorization_data = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_AuthorizationData.c b/lib/libkrb5/generated/asn1_AuthorizationData.c
index 14b310d8f8d..3f84d48cb4e 100644
--- a/lib/libkrb5/generated/asn1_AuthorizationData.c
+++ b/lib/libkrb5/generated/asn1_AuthorizationData.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -29,7 +29,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(&(data)->val[i])->ad_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -38,15 +38,15 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(&(data)->val[i])->ad_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -63,7 +63,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -77,7 +77,7 @@ ret = 0;
while(ret < origlen) {
(data)->len++;
(data)->val = realloc((data)->val, sizeof(*((data)->val)) * (data)->len);
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -86,7 +86,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -112,7 +112,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -159,6 +159,7 @@ free_octet_string(&(&(data)->val[(data)->len-1])->ad_data);
(data)->len--;
}
free((data)->val);
+(data)->val = NULL;
}
size_t
@@ -170,6 +171,8 @@ int oldret = ret;
int i;
ret = 0;
for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
{
int oldret = ret;
ret = 0;
@@ -183,6 +186,7 @@ ret += length_octet_string(&(&(data)->val[i])->ad_data);
ret += 1 + length_len(ret) + oldret;
}
ret += 1 + length_len(ret);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_CBCParameter.c b/lib/libkrb5/generated/asn1_CBCParameter.c
new file mode 100644
index 00000000000..d84b72fb191
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_CBCParameter.c
@@ -0,0 +1,70 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_CBCParameter(unsigned char *p, size_t len, const CBCParameter *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_octet_string(p, len, data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_CBCParameter(const unsigned char *p, size_t len, CBCParameter *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_octet_string(p, len, data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_CBCParameter(data);
+return e;
+}
+
+void
+free_CBCParameter(CBCParameter *data)
+{
+free_octet_string(data);
+}
+
+size_t
+length_CBCParameter(const CBCParameter *data)
+{
+size_t ret = 0;
+ret += length_octet_string(data);
+return ret;
+}
+
+int
+copy_CBCParameter(const CBCParameter *from, CBCParameter *to)
+{
+if(copy_octet_string(from, to)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_CKSUMTYPE.c b/lib/libkrb5/generated/asn1_CKSUMTYPE.c
index 38b26dc691d..bf281d11854 100644
--- a/lib/libkrb5/generated/asn1_CKSUMTYPE.c
+++ b/lib/libkrb5/generated/asn1_CKSUMTYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_ChangePasswdDataMS.c b/lib/libkrb5/generated/asn1_ChangePasswdDataMS.c
index 3c7ec493976..2a445b29011 100644
--- a/lib/libkrb5/generated/asn1_ChangePasswdDataMS.c
+++ b/lib/libkrb5/generated/asn1_ChangePasswdDataMS.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, (data)->targrealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->targname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -46,11 +46,11 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->newpasswd, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -67,7 +67,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -76,7 +76,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -102,7 +102,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->targname = NULL;
else {
@@ -130,7 +130,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->targrealm = NULL;
else {
@@ -174,10 +174,12 @@ free_octet_string(&(data)->newpasswd);
if((data)->targname) {
free_PrincipalName((data)->targname);
free((data)->targname);
+(data)->targname = NULL;
}
if((data)->targrealm) {
free_Realm((data)->targrealm);
free((data)->targrealm);
+(data)->targrealm = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_Checksum.c b/lib/libkrb5/generated/asn1_Checksum.c
index 63626216783..ef1787fdee3 100644
--- a/lib/libkrb5/generated/asn1_Checksum.c
+++ b/lib/libkrb5/generated/asn1_Checksum.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->checksum, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_CKSUMTYPE(p, len, &(data)->cksumtype, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_ENCTYPE.c b/lib/libkrb5/generated/asn1_ENCTYPE.c
index e58f4e4e0c9..86629dfd3d5 100644
--- a/lib/libkrb5/generated/asn1_ENCTYPE.c
+++ b/lib/libkrb5/generated/asn1_ENCTYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_ETYPE_INFO.c b/lib/libkrb5/generated/asn1_ETYPE_INFO.c
index 91141b63dc5..c122bb8e7df 100644
--- a/lib/libkrb5/generated/asn1_ETYPE_INFO.c
+++ b/lib/libkrb5/generated/asn1_ETYPE_INFO.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ e = encode_ETYPE_INFO_ENTRY(p, len, &(data)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -45,7 +45,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -80,6 +80,7 @@ free_ETYPE_INFO_ENTRY(&(data)->val[(data)->len-1]);
(data)->len--;
}
free((data)->val);
+(data)->val = NULL;
}
size_t
@@ -91,7 +92,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_ETYPE_INFO_ENTRY(&(data)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_ETYPE_INFO2.c b/lib/libkrb5/generated/asn1_ETYPE_INFO2.c
new file mode 100644
index 00000000000..ce1503d78c9
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_ETYPE_INFO2.c
@@ -0,0 +1,115 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_ETYPE_INFO2(unsigned char *p, size_t len, const ETYPE_INFO2 *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+for(i = (data)->len - 1; i >= 0; --i) {
+int oldret = ret;
+ret = 0;
+e = encode_ETYPE_INFO2_ENTRY(p, len, &(data)->val[i], &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_ETYPE_INFO2(const unsigned char *p, size_t len, ETYPE_INFO2 *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+if(len < reallen)
+return ASN1_OVERRUN;
+len = reallen;
+{
+size_t origlen = len;
+int oldret = ret;
+ret = 0;
+(data)->len = 0;
+(data)->val = NULL;
+while(ret < origlen) {
+(data)->len++;
+(data)->val = realloc((data)->val, sizeof(*((data)->val)) * (data)->len);
+e = decode_ETYPE_INFO2_ENTRY(p, len, &(data)->val[(data)->len-1], &l);
+FORW;
+len = origlen - ret;
+}
+ret += oldret;
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_ETYPE_INFO2(data);
+return e;
+}
+
+void
+free_ETYPE_INFO2(ETYPE_INFO2 *data)
+{
+while((data)->len){
+free_ETYPE_INFO2_ENTRY(&(data)->val[(data)->len-1]);
+(data)->len--;
+}
+free((data)->val);
+(data)->val = NULL;
+}
+
+size_t
+length_ETYPE_INFO2(const ETYPE_INFO2 *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+int i;
+ret = 0;
+for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
+ret += length_ETYPE_INFO2_ENTRY(&(data)->val[i]);
+ret += oldret;
+}
+ret += 1 + length_len(ret) + oldret;
+}
+return ret;
+}
+
+int
+copy_ETYPE_INFO2(const ETYPE_INFO2 *from, ETYPE_INFO2 *to)
+{
+if(((to)->val = malloc((from)->len * sizeof(*(to)->val))) == NULL && (from)->len != 0)
+return ENOMEM;
+for((to)->len = 0; (to)->len < (from)->len; (to)->len++){
+if(copy_ETYPE_INFO2_ENTRY(&(from)->val[(to)->len], &(to)->val[(to)->len])) return ENOMEM;
+}
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_ETYPE_INFO2_ENTRY.c b/lib/libkrb5/generated/asn1_ETYPE_INFO2_ENTRY.c
new file mode 100644
index 00000000000..362ff5c8bd4
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_ETYPE_INFO2_ENTRY.c
@@ -0,0 +1,230 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_ETYPE_INFO2_ENTRY(unsigned char *p, size_t len, const ETYPE_INFO2_ENTRY *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+if((data)->s2kparams)
+{
+int oldret = ret;
+ret = 0;
+e = encode_octet_string(p, len, (data)->s2kparams, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
+BACK;
+ret += oldret;
+}
+if((data)->salt)
+{
+int oldret = ret;
+ret = 0;
+e = encode_KerberosString(p, len, (data)->salt, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_ENCTYPE(p, len, &(data)->etype, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_ETYPE_INFO2_ENTRY(const unsigned char *p, size_t len, ETYPE_INFO2_ENTRY *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_ENCTYPE(p, len, &(data)->etype, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+(data)->salt = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->salt = malloc(sizeof(*(data)->salt));
+if((data)->salt == NULL) return ENOMEM;
+e = decode_KerberosString(p, len, (data)->salt, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
+if (e)
+(data)->s2kparams = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->s2kparams = malloc(sizeof(*(data)->s2kparams));
+if((data)->s2kparams == NULL) return ENOMEM;
+e = decode_octet_string(p, len, (data)->s2kparams, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_ETYPE_INFO2_ENTRY(data);
+return e;
+}
+
+void
+free_ETYPE_INFO2_ENTRY(ETYPE_INFO2_ENTRY *data)
+{
+free_ENCTYPE(&(data)->etype);
+if((data)->salt) {
+free_KerberosString((data)->salt);
+free((data)->salt);
+(data)->salt = NULL;
+}
+if((data)->s2kparams) {
+free_octet_string((data)->s2kparams);
+free((data)->s2kparams);
+(data)->s2kparams = NULL;
+}
+}
+
+size_t
+length_ETYPE_INFO2_ENTRY(const ETYPE_INFO2_ENTRY *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_ENCTYPE(&(data)->etype);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->salt){
+int oldret = ret;
+ret = 0;
+ret += length_KerberosString((data)->salt);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->s2kparams){
+int oldret = ret;
+ret = 0;
+ret += length_octet_string((data)->s2kparams);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_ETYPE_INFO2_ENTRY(const ETYPE_INFO2_ENTRY *from, ETYPE_INFO2_ENTRY *to)
+{
+if(copy_ENCTYPE(&(from)->etype, &(to)->etype)) return ENOMEM;
+if((from)->salt) {
+(to)->salt = malloc(sizeof(*(to)->salt));
+if((to)->salt == NULL) return ENOMEM;
+if(copy_KerberosString((from)->salt, (to)->salt)) return ENOMEM;
+}else
+(to)->salt = NULL;
+if((from)->s2kparams) {
+(to)->s2kparams = malloc(sizeof(*(to)->s2kparams));
+if((to)->s2kparams == NULL) return ENOMEM;
+if(copy_octet_string((from)->s2kparams, (to)->s2kparams)) return ENOMEM;
+}else
+(to)->s2kparams = NULL;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_ETYPE_INFO_ENTRY.c b/lib/libkrb5/generated/asn1_ETYPE_INFO_ENTRY.c
index 4d872477453..87f11751e69 100644
--- a/lib/libkrb5/generated/asn1_ETYPE_INFO_ENTRY.c
+++ b/lib/libkrb5/generated/asn1_ETYPE_INFO_ENTRY.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->salttype, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, (data)->salt, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -46,11 +46,11 @@ int oldret = ret;
ret = 0;
e = encode_ENCTYPE(p, len, &(data)->etype, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -67,7 +67,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -76,7 +76,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -102,7 +102,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->salt = NULL;
else {
@@ -130,7 +130,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->salttype = NULL;
else {
@@ -174,9 +174,11 @@ free_ENCTYPE(&(data)->etype);
if((data)->salt) {
free_octet_string((data)->salt);
free((data)->salt);
+(data)->salt = NULL;
}
if((data)->salttype) {
free((data)->salttype);
+(data)->salttype = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_EncAPRepPart.c b/lib/libkrb5/generated/asn1_EncAPRepPart.c
index 0174bf5b38c..8a039115039 100644
--- a/lib/libkrb5/generated/asn1_EncAPRepPart.c
+++ b/lib/libkrb5/generated/asn1_EncAPRepPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_UNSIGNED(p, len, (data)->seq_number, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, (data)->subkey, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -46,7 +46,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->cusec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -55,13 +55,13 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->ctime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 27, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 27, &l);
BACK;
*size = ret;
return 0;
@@ -78,13 +78,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 27, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 27, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -93,7 +93,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -119,7 +119,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -145,7 +145,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->subkey = NULL;
else {
@@ -173,7 +173,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->seq_number = NULL;
else {
@@ -222,10 +222,12 @@ free_KerberosTime(&(data)->ctime);
if((data)->subkey) {
free_EncryptionKey((data)->subkey);
free((data)->subkey);
+(data)->subkey = NULL;
}
if((data)->seq_number) {
free_UNSIGNED((data)->seq_number);
free((data)->seq_number);
+(data)->seq_number = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_EncASRepPart.c b/lib/libkrb5/generated/asn1_EncASRepPart.c
index 1b3f096e335..df60ddf9a63 100644
--- a/lib/libkrb5/generated/asn1_EncASRepPart.c
+++ b/lib/libkrb5/generated/asn1_EncASRepPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_EncKDCRepPart(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 25, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 25, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 25, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 25, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_EncKDCRepPart.c b/lib/libkrb5/generated/asn1_EncKDCRepPart.c
index 86d5bb80924..30d32a0847b 100644
--- a/lib/libkrb5/generated/asn1_EncKDCRepPart.c
+++ b/lib/libkrb5/generated/asn1_EncKDCRepPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddresses(p, len, (data)->caddr, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 11, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 11, &l);
BACK;
ret += oldret;
}
@@ -36,7 +36,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->sname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -45,7 +45,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->srealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -55,7 +55,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->renew_till, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -64,7 +64,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->endtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -74,7 +74,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->starttime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -83,7 +83,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->authtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -92,7 +92,7 @@ int oldret = ret;
ret = 0;
e = encode_TicketFlags(p, len, &(data)->flags, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -102,7 +102,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->key_expiration, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -111,7 +111,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->nonce, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -120,7 +120,7 @@ int oldret = ret;
ret = 0;
e = encode_LastReq(p, len, &(data)->last_req, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -129,11 +129,11 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, &(data)->key, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -150,7 +150,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -159,7 +159,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -185,7 +185,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -211,7 +211,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -237,7 +237,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->key_expiration = NULL;
else {
@@ -265,7 +265,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -291,7 +291,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
return e;
else {
@@ -317,7 +317,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->starttime = NULL;
else {
@@ -345,7 +345,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
return e;
else {
@@ -371,7 +371,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->renew_till = NULL;
else {
@@ -399,7 +399,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
return e;
else {
@@ -425,7 +425,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
return e;
else {
@@ -451,7 +451,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 11, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 11, &l);
if (e)
(data)->caddr = NULL;
else {
@@ -496,23 +496,27 @@ free_LastReq(&(data)->last_req);
if((data)->key_expiration) {
free_KerberosTime((data)->key_expiration);
free((data)->key_expiration);
+(data)->key_expiration = NULL;
}
free_TicketFlags(&(data)->flags);
free_KerberosTime(&(data)->authtime);
if((data)->starttime) {
free_KerberosTime((data)->starttime);
free((data)->starttime);
+(data)->starttime = NULL;
}
free_KerberosTime(&(data)->endtime);
if((data)->renew_till) {
free_KerberosTime((data)->renew_till);
free((data)->renew_till);
+(data)->renew_till = NULL;
}
free_Realm(&(data)->srealm);
free_PrincipalName(&(data)->sname);
if((data)->caddr) {
free_HostAddresses((data)->caddr);
free((data)->caddr);
+(data)->caddr = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_EncKrbCredPart.c b/lib/libkrb5/generated/asn1_EncKrbCredPart.c
index 25e111b306c..870d4d81b50 100644
--- a/lib/libkrb5/generated/asn1_EncKrbCredPart.c
+++ b/lib/libkrb5/generated/asn1_EncKrbCredPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->r_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->s_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->usec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -57,7 +57,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->timestamp, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -67,7 +67,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->nonce, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -81,15 +81,15 @@ e = encode_KrbCredInfo(p, len, &(&(data)->ticket_info)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 29, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 29, &l);
BACK;
*size = ret;
return 0;
@@ -106,13 +106,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 29, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 29, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -121,7 +121,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -134,7 +134,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -165,7 +165,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->nonce = NULL;
else {
@@ -193,7 +193,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->timestamp = NULL;
else {
@@ -221,7 +221,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->usec = NULL;
else {
@@ -249,7 +249,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->s_address = NULL;
else {
@@ -277,7 +277,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->r_address = NULL;
else {
@@ -327,23 +327,29 @@ free_KrbCredInfo(&(&(data)->ticket_info)->val[(&(data)->ticket_info)->len-1]);
(&(data)->ticket_info)->len--;
}
free((&(data)->ticket_info)->val);
+(&(data)->ticket_info)->val = NULL;
if((data)->nonce) {
free((data)->nonce);
+(data)->nonce = NULL;
}
if((data)->timestamp) {
free_KerberosTime((data)->timestamp);
free((data)->timestamp);
+(data)->timestamp = NULL;
}
if((data)->usec) {
free((data)->usec);
+(data)->usec = NULL;
}
if((data)->s_address) {
free_HostAddress((data)->s_address);
free((data)->s_address);
+(data)->s_address = NULL;
}
if((data)->r_address) {
free_HostAddress((data)->r_address);
free((data)->r_address);
+(data)->r_address = NULL;
}
}
@@ -359,7 +365,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (&(data)->ticket_info)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_KrbCredInfo(&(&(data)->ticket_info)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_EncKrbPrivPart.c b/lib/libkrb5/generated/asn1_EncKrbPrivPart.c
index d5d4e42dc5b..9cdab22cb44 100644
--- a/lib/libkrb5/generated/asn1_EncKrbPrivPart.c
+++ b/lib/libkrb5/generated/asn1_EncKrbPrivPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->r_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->s_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_UNSIGNED(p, len, (data)->seq_number, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -57,7 +57,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->usec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -67,7 +67,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->timestamp, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -76,13 +76,13 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->user_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 28, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 28, &l);
BACK;
*size = ret;
return 0;
@@ -99,13 +99,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 28, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 28, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -114,7 +114,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -140,7 +140,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->timestamp = NULL;
else {
@@ -168,7 +168,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->usec = NULL;
else {
@@ -196,7 +196,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->seq_number = NULL;
else {
@@ -224,7 +224,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->s_address = NULL;
else {
@@ -252,7 +252,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->r_address = NULL;
else {
@@ -301,21 +301,26 @@ free_octet_string(&(data)->user_data);
if((data)->timestamp) {
free_KerberosTime((data)->timestamp);
free((data)->timestamp);
+(data)->timestamp = NULL;
}
if((data)->usec) {
free((data)->usec);
+(data)->usec = NULL;
}
if((data)->seq_number) {
free_UNSIGNED((data)->seq_number);
free((data)->seq_number);
+(data)->seq_number = NULL;
}
if((data)->s_address) {
free_HostAddress((data)->s_address);
free((data)->s_address);
+(data)->s_address = NULL;
}
if((data)->r_address) {
free_HostAddress((data)->r_address);
free((data)->r_address);
+(data)->r_address = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_EncTGSRepPart.c b/lib/libkrb5/generated/asn1_EncTGSRepPart.c
index 502ae2cd8a7..77525fef067 100644
--- a/lib/libkrb5/generated/asn1_EncTGSRepPart.c
+++ b/lib/libkrb5/generated/asn1_EncTGSRepPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_EncKDCRepPart(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 26, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 26, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 26, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 26, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_EncTicketPart.c b/lib/libkrb5/generated/asn1_EncTicketPart.c
index 4773fa46046..f1332182e0c 100644
--- a/lib/libkrb5/generated/asn1_EncTicketPart.c
+++ b/lib/libkrb5/generated/asn1_EncTicketPart.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_AuthorizationData(p, len, (data)->authorization_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddresses(p, len, (data)->caddr, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->renew_till, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -56,7 +56,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->endtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -66,7 +66,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->starttime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -75,7 +75,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->authtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -84,7 +84,7 @@ int oldret = ret;
ret = 0;
e = encode_TransitedEncoding(p, len, &(data)->transited, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -93,7 +93,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->cname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -102,7 +102,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->crealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -111,7 +111,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, &(data)->key, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -120,13 +120,13 @@ int oldret = ret;
ret = 0;
e = encode_TicketFlags(p, len, &(data)->flags, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 3, &l);
BACK;
*size = ret;
return 0;
@@ -143,13 +143,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 3, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 3, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -158,7 +158,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -184,7 +184,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -210,7 +210,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -236,7 +236,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
@@ -262,7 +262,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -288,7 +288,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
return e;
else {
@@ -314,7 +314,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->starttime = NULL;
else {
@@ -342,7 +342,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
return e;
else {
@@ -368,7 +368,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->renew_till = NULL;
else {
@@ -396,7 +396,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
(data)->caddr = NULL;
else {
@@ -424,7 +424,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
(data)->authorization_data = NULL;
else {
@@ -478,19 +478,23 @@ free_KerberosTime(&(data)->authtime);
if((data)->starttime) {
free_KerberosTime((data)->starttime);
free((data)->starttime);
+(data)->starttime = NULL;
}
free_KerberosTime(&(data)->endtime);
if((data)->renew_till) {
free_KerberosTime((data)->renew_till);
free((data)->renew_till);
+(data)->renew_till = NULL;
}
if((data)->caddr) {
free_HostAddresses((data)->caddr);
free((data)->caddr);
+(data)->caddr = NULL;
}
if((data)->authorization_data) {
free_AuthorizationData((data)->authorization_data);
free((data)->authorization_data);
+(data)->authorization_data = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_EncryptedData.c b/lib/libkrb5/generated/asn1_EncryptedData.c
index 7625cc6597e..629c3b30076 100644
--- a/lib/libkrb5/generated/asn1_EncryptedData.c
+++ b/lib/libkrb5/generated/asn1_EncryptedData.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->cipher, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -36,7 +36,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->kvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -45,11 +45,11 @@ int oldret = ret;
ret = 0;
e = encode_ENCTYPE(p, len, &(data)->etype, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -66,7 +66,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -75,7 +75,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -101,7 +101,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->kvno = NULL;
else {
@@ -129,7 +129,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -170,6 +170,7 @@ free_EncryptedData(EncryptedData *data)
free_ENCTYPE(&(data)->etype);
if((data)->kvno) {
free((data)->kvno);
+(data)->kvno = NULL;
}
free_octet_string(&(data)->cipher);
}
diff --git a/lib/libkrb5/generated/asn1_EncryptionKey.c b/lib/libkrb5/generated/asn1_EncryptionKey.c
index 9fcd3cf4f77..19dd4c11dfd 100644
--- a/lib/libkrb5/generated/asn1_EncryptionKey.c
+++ b/lib/libkrb5/generated/asn1_EncryptionKey.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->keyvalue, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->keytype, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_EtypeList.c b/lib/libkrb5/generated/asn1_EtypeList.c
new file mode 100644
index 00000000000..2b9aea99eed
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_EtypeList.c
@@ -0,0 +1,114 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_EtypeList(unsigned char *p, size_t len, const EtypeList *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+for(i = (data)->len - 1; i >= 0; --i) {
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->val[i], &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_EtypeList(const unsigned char *p, size_t len, EtypeList *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+if(len < reallen)
+return ASN1_OVERRUN;
+len = reallen;
+{
+size_t origlen = len;
+int oldret = ret;
+ret = 0;
+(data)->len = 0;
+(data)->val = NULL;
+while(ret < origlen) {
+(data)->len++;
+(data)->val = realloc((data)->val, sizeof(*((data)->val)) * (data)->len);
+e = decode_integer(p, len, &(data)->val[(data)->len-1], &l);
+FORW;
+len = origlen - ret;
+}
+ret += oldret;
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_EtypeList(data);
+return e;
+}
+
+void
+free_EtypeList(EtypeList *data)
+{
+while((data)->len){
+(data)->len--;
+}
+free((data)->val);
+(data)->val = NULL;
+}
+
+size_t
+length_EtypeList(const EtypeList *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+int i;
+ret = 0;
+for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->val[i]);
+ret += oldret;
+}
+ret += 1 + length_len(ret) + oldret;
+}
+return ret;
+}
+
+int
+copy_EtypeList(const EtypeList *from, EtypeList *to)
+{
+if(((to)->val = malloc((from)->len * sizeof(*(to)->val))) == NULL && (from)->len != 0)
+return ENOMEM;
+for((to)->len = 0; (to)->len < (from)->len; (to)->len++){
+*(&(to)->val[(to)->len]) = *(&(from)->val[(to)->len]);
+}
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_Event.c b/lib/libkrb5/generated/asn1_Event.c
index 401fc49b615..bd59c59677a 100644
--- a/lib/libkrb5/generated/asn1_Event.c
+++ b/lib/libkrb5/generated/asn1_Event.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ int oldret = ret;
ret = 0;
e = encode_Principal(p, len, (data)->principal, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -37,11 +37,11 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->time, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -58,7 +58,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -67,7 +67,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -93,7 +93,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->principal = NULL;
else {
@@ -137,6 +137,7 @@ free_KerberosTime(&(data)->time);
if((data)->principal) {
free_Principal((data)->principal);
free((data)->principal);
+(data)->principal = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_GENERATION.c b/lib/libkrb5/generated/asn1_GENERATION.c
index 4a6b4055bf8..60118e14601 100644
--- a/lib/libkrb5/generated/asn1_GENERATION.c
+++ b/lib/libkrb5/generated/asn1_GENERATION.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -25,18 +25,18 @@ i = 0;
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, &(data)->gen, &l);
+e = encode_unsigned(p, len, &(data)->gen, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, &(data)->usec, &l);
+e = encode_unsigned(p, len, &(data)->usec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -45,11 +45,11 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->time, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -66,7 +66,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -75,7 +75,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -101,7 +101,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -114,7 +114,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = decode_integer(p, len, &(data)->usec, &l);
+e = decode_unsigned(p, len, &(data)->usec, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -127,7 +127,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -140,7 +140,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = decode_integer(p, len, &(data)->gen, &l);
+e = decode_unsigned(p, len, &(data)->gen, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -181,13 +181,13 @@ ret += 1 + length_len(ret) + oldret;
{
int oldret = ret;
ret = 0;
-ret += length_integer(&(data)->usec);
+ret += length_unsigned(&(data)->usec);
ret += 1 + length_len(ret) + oldret;
}
{
int oldret = ret;
ret = 0;
-ret += length_integer(&(data)->gen);
+ret += length_unsigned(&(data)->gen);
ret += 1 + length_len(ret) + oldret;
}
ret += 1 + length_len(ret);
diff --git a/lib/libkrb5/generated/asn1_HDBFlags.c b/lib/libkrb5/generated/asn1_HDBFlags.c
index 3a1516b00c1..c2e209b2c08 100644
--- a/lib/libkrb5/generated/asn1_HDBFlags.c
+++ b/lib/libkrb5/generated/asn1_HDBFlags.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -50,7 +50,7 @@ len -= 2;
ret += 2;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, PRIM,UT_BitString, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, PRIM,UT_BitString, &l);
BACK;
*size = ret;
return 0;
@@ -67,7 +67,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, PRIM, UT_BitString,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, PRIM, UT_BitString,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -159,7 +159,7 @@ HDBFlags int2HDBFlags(unsigned n)
return flags;
}
-struct units HDBFlags_units[] = {
+static struct units HDBFlags_units[] = {
{"immutable", 1U << 13},
{"user_to_user", 1U << 12},
{"ok_as_delegate", 1U << 11},
@@ -177,3 +177,7 @@ struct units HDBFlags_units[] = {
{NULL, 0}
};
+const struct units * asn1_HDBFlags_units(void){
+return HDBFlags_units;
+}
+
diff --git a/lib/libkrb5/generated/asn1_HostAddress.c b/lib/libkrb5/generated/asn1_HostAddress.c
index 7eb4012c5ed..8598d6458c1 100644
--- a/lib/libkrb5/generated/asn1_HostAddress.c
+++ b/lib/libkrb5/generated/asn1_HostAddress.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->addr_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_HostAddresses.c b/lib/libkrb5/generated/asn1_HostAddresses.c
index 49d095ce2a5..fadc564dc22 100644
--- a/lib/libkrb5/generated/asn1_HostAddresses.c
+++ b/lib/libkrb5/generated/asn1_HostAddresses.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ e = encode_HostAddress(p, len, &(data)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -45,7 +45,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -80,6 +80,7 @@ free_HostAddress(&(data)->val[(data)->len-1]);
(data)->len--;
}
free((data)->val);
+(data)->val = NULL;
}
size_t
@@ -91,7 +92,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_HostAddress(&(data)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_KDCOptions.c b/lib/libkrb5/generated/asn1_KDCOptions.c
index 57f784b73f9..480e6a0f8e6 100644
--- a/lib/libkrb5/generated/asn1_KDCOptions.c
+++ b/lib/libkrb5/generated/asn1_KDCOptions.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -54,7 +54,7 @@ len -= 2;
ret += 2;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, PRIM,UT_BitString, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, PRIM,UT_BitString, &l);
BACK;
*size = ret;
return 0;
@@ -71,7 +71,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, PRIM, UT_BitString,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, PRIM, UT_BitString,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -180,7 +180,7 @@ KDCOptions int2KDCOptions(unsigned n)
return flags;
}
-struct units KDCOptions_units[] = {
+static struct units KDCOptions_units[] = {
{"validate", 1U << 31},
{"renew", 1U << 30},
{"enc_tkt_in_skey", 1U << 28},
@@ -203,3 +203,7 @@ struct units KDCOptions_units[] = {
{NULL, 0}
};
+const struct units * asn1_KDCOptions_units(void){
+return KDCOptions_units;
+}
+
diff --git a/lib/libkrb5/generated/asn1_KDC_REP.c b/lib/libkrb5/generated/asn1_KDC_REP.c
index 14b7ddff225..16f00d93859 100644
--- a/lib/libkrb5/generated/asn1_KDC_REP.c
+++ b/lib/libkrb5/generated/asn1_KDC_REP.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->enc_part, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_Ticket(p, len, &(data)->ticket, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -44,7 +44,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->cname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -53,7 +53,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->crealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -63,7 +63,7 @@ int oldret = ret;
ret = 0;
e = encode_METHOD_DATA(p, len, (data)->padata, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -72,7 +72,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -81,11 +81,11 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -102,7 +102,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -111,7 +111,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -137,7 +137,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -163,7 +163,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->padata = NULL;
else {
@@ -191,7 +191,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
@@ -217,7 +217,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -243,7 +243,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
return e;
else {
@@ -269,7 +269,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
return e;
else {
@@ -311,6 +311,7 @@ free_MESSAGE_TYPE(&(data)->msg_type);
if((data)->padata) {
free_METHOD_DATA((data)->padata);
free((data)->padata);
+(data)->padata = NULL;
}
free_Realm(&(data)->crealm);
free_PrincipalName(&(data)->cname);
diff --git a/lib/libkrb5/generated/asn1_KDC_REQ.c b/lib/libkrb5/generated/asn1_KDC_REQ.c
index bb75ebeaf93..7a4608adfd3 100644
--- a/lib/libkrb5/generated/asn1_KDC_REQ.c
+++ b/lib/libkrb5/generated/asn1_KDC_REQ.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_KDC_REQ_BODY(p, len, &(data)->req_body, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -36,7 +36,7 @@ int oldret = ret;
ret = 0;
e = encode_METHOD_DATA(p, len, (data)->padata, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -45,7 +45,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -54,11 +54,11 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -75,7 +75,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -84,7 +84,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -110,7 +110,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -136,7 +136,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->padata = NULL;
else {
@@ -164,7 +164,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -206,6 +206,7 @@ free_MESSAGE_TYPE(&(data)->msg_type);
if((data)->padata) {
free_METHOD_DATA((data)->padata);
free((data)->padata);
+(data)->padata = NULL;
}
free_KDC_REQ_BODY(&(data)->req_body);
}
diff --git a/lib/libkrb5/generated/asn1_KDC_REQ_BODY.c b/lib/libkrb5/generated/asn1_KDC_REQ_BODY.c
index e3fd4782c0e..1272de82c68 100644
--- a/lib/libkrb5/generated/asn1_KDC_REQ_BODY.c
+++ b/lib/libkrb5/generated/asn1_KDC_REQ_BODY.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -32,9 +32,9 @@ e = encode_Ticket(p, len, &((data)->additional_tickets)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 11, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 11, &l);
BACK;
ret += oldret;
}
@@ -44,7 +44,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, (data)->enc_authorization_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -54,7 +54,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddresses(p, len, (data)->addresses, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -68,9 +68,9 @@ e = encode_ENCTYPE(p, len, &(&(data)->etype)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -79,7 +79,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->nonce, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -89,7 +89,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->rtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -99,7 +99,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->till, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -109,7 +109,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->from, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -119,7 +119,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->sname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -128,7 +128,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->realm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -138,7 +138,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->cname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -147,11 +147,11 @@ int oldret = ret;
ret = 0;
e = encode_KDCOptions(p, len, &(data)->kdc_options, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -168,7 +168,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -177,7 +177,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -203,7 +203,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->cname = NULL;
else {
@@ -231,7 +231,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -257,7 +257,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->sname = NULL;
else {
@@ -285,7 +285,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->from = NULL;
else {
@@ -313,7 +313,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->till = NULL;
else {
@@ -341,7 +341,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->rtime = NULL;
else {
@@ -369,7 +369,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
return e;
else {
@@ -395,7 +395,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
return e;
else {
@@ -408,7 +408,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -439,7 +439,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
(data)->addresses = NULL;
else {
@@ -467,7 +467,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
(data)->enc_authorization_data = NULL;
else {
@@ -495,7 +495,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 11, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 11, &l);
if (e)
(data)->additional_tickets = NULL;
else {
@@ -510,7 +510,7 @@ oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
(data)->additional_tickets = malloc(sizeof(*(data)->additional_tickets));
if((data)->additional_tickets == NULL) return ENOMEM;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -557,36 +557,44 @@ free_KDCOptions(&(data)->kdc_options);
if((data)->cname) {
free_PrincipalName((data)->cname);
free((data)->cname);
+(data)->cname = NULL;
}
free_Realm(&(data)->realm);
if((data)->sname) {
free_PrincipalName((data)->sname);
free((data)->sname);
+(data)->sname = NULL;
}
if((data)->from) {
free_KerberosTime((data)->from);
free((data)->from);
+(data)->from = NULL;
}
if((data)->till) {
free_KerberosTime((data)->till);
free((data)->till);
+(data)->till = NULL;
}
if((data)->rtime) {
free_KerberosTime((data)->rtime);
free((data)->rtime);
+(data)->rtime = NULL;
}
while((&(data)->etype)->len){
free_ENCTYPE(&(&(data)->etype)->val[(&(data)->etype)->len-1]);
(&(data)->etype)->len--;
}
free((&(data)->etype)->val);
+(&(data)->etype)->val = NULL;
if((data)->addresses) {
free_HostAddresses((data)->addresses);
free((data)->addresses);
+(data)->addresses = NULL;
}
if((data)->enc_authorization_data) {
free_EncryptedData((data)->enc_authorization_data);
free((data)->enc_authorization_data);
+(data)->enc_authorization_data = NULL;
}
if((data)->additional_tickets) {
while(((data)->additional_tickets)->len){
@@ -594,7 +602,9 @@ free_Ticket(&((data)->additional_tickets)->val[((data)->additional_tickets)->len
((data)->additional_tickets)->len--;
}
free(((data)->additional_tickets)->val);
+((data)->additional_tickets)->val = NULL;
free((data)->additional_tickets);
+(data)->additional_tickets = NULL;
}
}
@@ -658,7 +668,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (&(data)->etype)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_ENCTYPE(&(&(data)->etype)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
@@ -684,7 +697,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = ((data)->additional_tickets)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_Ticket(&((data)->additional_tickets)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_KRB_CRED.c b/lib/libkrb5/generated/asn1_KRB_CRED.c
index f5bcb132cf4..2f8e27e4544 100644
--- a/lib/libkrb5/generated/asn1_KRB_CRED.c
+++ b/lib/libkrb5/generated/asn1_KRB_CRED.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->enc_part, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -40,9 +40,9 @@ e = encode_Ticket(p, len, &(&(data)->tickets)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -51,7 +51,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -60,13 +60,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 22, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 22, &l);
BACK;
*size = ret;
return 0;
@@ -83,13 +83,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 22, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 22, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -98,7 +98,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -124,7 +124,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -150,7 +150,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -163,7 +163,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -194,7 +194,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
@@ -243,6 +243,7 @@ free_Ticket(&(&(data)->tickets)->val[(&(data)->tickets)->len-1]);
(&(data)->tickets)->len--;
}
free((&(data)->tickets)->val);
+(&(data)->tickets)->val = NULL;
free_EncryptedData(&(data)->enc_part);
}
@@ -270,7 +271,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (&(data)->tickets)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_Ticket(&(&(data)->tickets)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_KRB_ERROR.c b/lib/libkrb5/generated/asn1_KRB_ERROR.c
index 241bf8f06e2..dd99078aaa3 100644
--- a/lib/libkrb5/generated/asn1_KRB_ERROR.c
+++ b/lib/libkrb5/generated/asn1_KRB_ERROR.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, (data)->e_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 12, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 12, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_general_string(p, len, (data)->e_text, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 11, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 11, &l);
BACK;
ret += oldret;
}
@@ -46,7 +46,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->sname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -55,7 +55,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->realm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -65,7 +65,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->cname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -75,7 +75,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, (data)->crealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -84,7 +84,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->error_code, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -93,7 +93,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->susec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -102,7 +102,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->stime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -112,7 +112,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->cusec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -122,7 +122,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->ctime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -131,7 +131,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -140,13 +140,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 30, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 30, &l);
BACK;
*size = ret;
return 0;
@@ -163,13 +163,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 30, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 30, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -178,7 +178,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -204,7 +204,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -230,7 +230,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->ctime = NULL;
else {
@@ -258,7 +258,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->cusec = NULL;
else {
@@ -286,7 +286,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
return e;
else {
@@ -312,7 +312,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
return e;
else {
@@ -338,7 +338,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
return e;
else {
@@ -364,7 +364,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
(data)->crealm = NULL;
else {
@@ -392,7 +392,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->cname = NULL;
else {
@@ -420,7 +420,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
return e;
else {
@@ -446,7 +446,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
return e;
else {
@@ -472,7 +472,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 11, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 11, &l);
if (e)
(data)->e_text = NULL;
else {
@@ -500,7 +500,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 12, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 12, &l);
if (e)
(data)->e_data = NULL;
else {
@@ -549,28 +549,34 @@ free_MESSAGE_TYPE(&(data)->msg_type);
if((data)->ctime) {
free_KerberosTime((data)->ctime);
free((data)->ctime);
+(data)->ctime = NULL;
}
if((data)->cusec) {
free((data)->cusec);
+(data)->cusec = NULL;
}
free_KerberosTime(&(data)->stime);
if((data)->crealm) {
free_Realm((data)->crealm);
free((data)->crealm);
+(data)->crealm = NULL;
}
if((data)->cname) {
free_PrincipalName((data)->cname);
free((data)->cname);
+(data)->cname = NULL;
}
free_Realm(&(data)->realm);
free_PrincipalName(&(data)->sname);
if((data)->e_text) {
free_general_string((data)->e_text);
free((data)->e_text);
+(data)->e_text = NULL;
}
if((data)->e_data) {
free_octet_string((data)->e_data);
free((data)->e_data);
+(data)->e_data = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_KRB_PRIV.c b/lib/libkrb5/generated/asn1_KRB_PRIV.c
index 3e460d6fcce..3fe61dc91a0 100644
--- a/lib/libkrb5/generated/asn1_KRB_PRIV.c
+++ b/lib/libkrb5/generated/asn1_KRB_PRIV.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->enc_part, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -44,13 +44,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 21, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 21, &l);
BACK;
*size = ret;
return 0;
@@ -67,13 +67,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 21, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 21, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -82,7 +82,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -108,7 +108,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -134,7 +134,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_KRB_SAFE.c b/lib/libkrb5/generated/asn1_KRB_SAFE.c
index f25ec1ce08a..767a350696a 100644
--- a/lib/libkrb5/generated/asn1_KRB_SAFE.c
+++ b/lib/libkrb5/generated/asn1_KRB_SAFE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_Checksum(p, len, &(data)->cksum, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_KRB_SAFE_BODY(p, len, &(data)->safe_body, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -44,7 +44,7 @@ int oldret = ret;
ret = 0;
e = encode_MESSAGE_TYPE(p, len, &(data)->msg_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -53,13 +53,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->pvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 20, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 20, &l);
BACK;
*size = ret;
return 0;
@@ -76,13 +76,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 20, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 20, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -91,7 +91,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -117,7 +117,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -143,7 +143,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -169,7 +169,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_KRB_SAFE_BODY.c b/lib/libkrb5/generated/asn1_KRB_SAFE_BODY.c
index 09014c2eb65..0ce1308ab8a 100644
--- a/lib/libkrb5/generated/asn1_KRB_SAFE_BODY.c
+++ b/lib/libkrb5/generated/asn1_KRB_SAFE_BODY.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->r_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddress(p, len, (data)->s_address, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_UNSIGNED(p, len, (data)->seq_number, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -57,7 +57,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->usec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -67,7 +67,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->timestamp, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -76,11 +76,11 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->user_data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -97,7 +97,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -106,7 +106,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -132,7 +132,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->timestamp = NULL;
else {
@@ -160,7 +160,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->usec = NULL;
else {
@@ -188,7 +188,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->seq_number = NULL;
else {
@@ -216,7 +216,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->s_address = NULL;
else {
@@ -244,7 +244,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->r_address = NULL;
else {
@@ -288,21 +288,26 @@ free_octet_string(&(data)->user_data);
if((data)->timestamp) {
free_KerberosTime((data)->timestamp);
free((data)->timestamp);
+(data)->timestamp = NULL;
}
if((data)->usec) {
free((data)->usec);
+(data)->usec = NULL;
}
if((data)->seq_number) {
free_UNSIGNED((data)->seq_number);
free((data)->seq_number);
+(data)->seq_number = NULL;
}
if((data)->s_address) {
free_HostAddress((data)->s_address);
free((data)->s_address);
+(data)->s_address = NULL;
}
if((data)->r_address) {
free_HostAddress((data)->r_address);
free((data)->r_address);
+(data)->r_address = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_KerberosString.c b/lib/libkrb5/generated/asn1_KerberosString.c
new file mode 100644
index 00000000000..40cfd842621
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_KerberosString.c
@@ -0,0 +1,70 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_KerberosString(unsigned char *p, size_t len, const KerberosString *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_general_string(p, len, data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_KerberosString(const unsigned char *p, size_t len, KerberosString *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_general_string(p, len, data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_KerberosString(data);
+return e;
+}
+
+void
+free_KerberosString(KerberosString *data)
+{
+free_general_string(data);
+}
+
+size_t
+length_KerberosString(const KerberosString *data)
+{
+size_t ret = 0;
+ret += length_general_string(data);
+return ret;
+}
+
+int
+copy_KerberosString(const KerberosString *from, KerberosString *to)
+{
+if(copy_general_string(from, to)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_KerberosTime.c b/lib/libkrb5/generated/asn1_KerberosTime.c
index c99bd75ac70..f30defc3065 100644
--- a/lib/libkrb5/generated/asn1_KerberosTime.c
+++ b/lib/libkrb5/generated/asn1_KerberosTime.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_Key.c b/lib/libkrb5/generated/asn1_Key.c
index 84f9b1739b3..9260248779e 100644
--- a/lib/libkrb5/generated/asn1_Key.c
+++ b/lib/libkrb5/generated/asn1_Key.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ int oldret = ret;
ret = 0;
e = encode_Salt(p, len, (data)->salt, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, &(data)->key, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -45,13 +45,13 @@ if((data)->mkvno)
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, (data)->mkvno, &l);
+e = encode_unsigned(p, len, (data)->mkvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -68,7 +68,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -77,7 +77,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
(data)->mkvno = NULL;
else {
@@ -92,7 +92,7 @@ oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
(data)->mkvno = malloc(sizeof(*(data)->mkvno));
if((data)->mkvno == NULL) return ENOMEM;
-e = decode_integer(p, len, (data)->mkvno, &l);
+e = decode_unsigned(p, len, (data)->mkvno, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -105,7 +105,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -131,7 +131,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->salt = NULL;
else {
@@ -173,11 +173,13 @@ free_Key(Key *data)
{
if((data)->mkvno) {
free((data)->mkvno);
+(data)->mkvno = NULL;
}
free_EncryptionKey(&(data)->key);
if((data)->salt) {
free_Salt((data)->salt);
free((data)->salt);
+(data)->salt = NULL;
}
}
@@ -188,7 +190,7 @@ size_t ret = 0;
if((data)->mkvno){
int oldret = ret;
ret = 0;
-ret += length_integer((data)->mkvno);
+ret += length_unsigned((data)->mkvno);
ret += 1 + length_len(ret) + oldret;
}
{
diff --git a/lib/libkrb5/generated/asn1_KrbCredInfo.c b/lib/libkrb5/generated/asn1_KrbCredInfo.c
index 8674330eba6..253141f2ea6 100644
--- a/lib/libkrb5/generated/asn1_KrbCredInfo.c
+++ b/lib/libkrb5/generated/asn1_KrbCredInfo.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_HostAddresses(p, len, (data)->caddr, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -37,7 +37,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->sname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -47,7 +47,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, (data)->srealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -57,7 +57,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->renew_till, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -67,7 +67,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->endtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -77,7 +77,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->starttime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -87,7 +87,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->authtime, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -97,7 +97,7 @@ int oldret = ret;
ret = 0;
e = encode_TicketFlags(p, len, (data)->flags, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -107,7 +107,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, (data)->pname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -117,7 +117,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, (data)->prealm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -126,11 +126,11 @@ int oldret = ret;
ret = 0;
e = encode_EncryptionKey(p, len, &(data)->key, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -147,7 +147,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -156,7 +156,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -182,7 +182,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->prealm = NULL;
else {
@@ -210,7 +210,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
(data)->pname = NULL;
else {
@@ -238,7 +238,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
(data)->flags = NULL;
else {
@@ -266,7 +266,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->authtime = NULL;
else {
@@ -294,7 +294,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->starttime = NULL;
else {
@@ -322,7 +322,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->endtime = NULL;
else {
@@ -350,7 +350,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
(data)->renew_till = NULL;
else {
@@ -378,7 +378,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->srealm = NULL;
else {
@@ -406,7 +406,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
(data)->sname = NULL;
else {
@@ -434,7 +434,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
(data)->caddr = NULL;
else {
@@ -478,42 +478,52 @@ free_EncryptionKey(&(data)->key);
if((data)->prealm) {
free_Realm((data)->prealm);
free((data)->prealm);
+(data)->prealm = NULL;
}
if((data)->pname) {
free_PrincipalName((data)->pname);
free((data)->pname);
+(data)->pname = NULL;
}
if((data)->flags) {
free_TicketFlags((data)->flags);
free((data)->flags);
+(data)->flags = NULL;
}
if((data)->authtime) {
free_KerberosTime((data)->authtime);
free((data)->authtime);
+(data)->authtime = NULL;
}
if((data)->starttime) {
free_KerberosTime((data)->starttime);
free((data)->starttime);
+(data)->starttime = NULL;
}
if((data)->endtime) {
free_KerberosTime((data)->endtime);
free((data)->endtime);
+(data)->endtime = NULL;
}
if((data)->renew_till) {
free_KerberosTime((data)->renew_till);
free((data)->renew_till);
+(data)->renew_till = NULL;
}
if((data)->srealm) {
free_Realm((data)->srealm);
free((data)->srealm);
+(data)->srealm = NULL;
}
if((data)->sname) {
free_PrincipalName((data)->sname);
free((data)->sname);
+(data)->sname = NULL;
}
if((data)->caddr) {
free_HostAddresses((data)->caddr);
free((data)->caddr);
+(data)->caddr = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_LR_TYPE.c b/lib/libkrb5/generated/asn1_LR_TYPE.c
index cc49961d075..54be8a2f148 100644
--- a/lib/libkrb5/generated/asn1_LR_TYPE.c
+++ b/lib/libkrb5/generated/asn1_LR_TYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_LastReq.c b/lib/libkrb5/generated/asn1_LastReq.c
index eeda025df11..cfeb94f89e6 100644
--- a/lib/libkrb5/generated/asn1_LastReq.c
+++ b/lib/libkrb5/generated/asn1_LastReq.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -29,7 +29,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(&(data)->val[i])->lr_value, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -38,15 +38,15 @@ int oldret = ret;
ret = 0;
e = encode_LR_TYPE(p, len, &(&(data)->val[i])->lr_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -63,7 +63,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -77,7 +77,7 @@ ret = 0;
while(ret < origlen) {
(data)->len++;
(data)->val = realloc((data)->val, sizeof(*((data)->val)) * (data)->len);
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -86,7 +86,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -112,7 +112,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -160,6 +160,7 @@ free_KerberosTime(&(&(data)->val[(data)->len-1])->lr_value);
(data)->len--;
}
free((data)->val);
+(data)->val = NULL;
}
size_t
@@ -171,6 +172,8 @@ int oldret = ret;
int i;
ret = 0;
for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
{
int oldret = ret;
ret = 0;
@@ -184,6 +187,7 @@ ret += length_KerberosTime(&(&(data)->val[i])->lr_value);
ret += 1 + length_len(ret) + oldret;
}
ret += 1 + length_len(ret);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_MESSAGE_TYPE.c b/lib/libkrb5/generated/asn1_MESSAGE_TYPE.c
index 4cf9346e6f8..ba2522a9426 100644
--- a/lib/libkrb5/generated/asn1_MESSAGE_TYPE.c
+++ b/lib/libkrb5/generated/asn1_MESSAGE_TYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_METHOD_DATA.c b/lib/libkrb5/generated/asn1_METHOD_DATA.c
index 101ddb9e8a7..49200035f83 100644
--- a/lib/libkrb5/generated/asn1_METHOD_DATA.c
+++ b/lib/libkrb5/generated/asn1_METHOD_DATA.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ e = encode_PA_DATA(p, len, &(data)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -45,7 +45,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -80,6 +80,7 @@ free_PA_DATA(&(data)->val[(data)->len-1]);
(data)->len--;
}
free((data)->val);
+(data)->val = NULL;
}
size_t
@@ -91,7 +92,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (data)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_PA_DATA(&(data)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_NAME_TYPE.c b/lib/libkrb5/generated/asn1_NAME_TYPE.c
index 1ad3dba1353..2a260645a18 100644
--- a/lib/libkrb5/generated/asn1_NAME_TYPE.c
+++ b/lib/libkrb5/generated/asn1_NAME_TYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_PADATA_TYPE.c b/lib/libkrb5/generated/asn1_PADATA_TYPE.c
index 33ca7728a8a..7a0f72b49b4 100644
--- a/lib/libkrb5/generated/asn1_PADATA_TYPE.c
+++ b/lib/libkrb5/generated/asn1_PADATA_TYPE.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_PA_DATA.c b/lib/libkrb5/generated/asn1_PA_DATA.c
index 458ada841cf..4a7fa787470 100644
--- a/lib/libkrb5/generated/asn1_PA_DATA.c
+++ b/lib/libkrb5/generated/asn1_PA_DATA.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->padata_value, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_PADATA_TYPE(p, len, &(data)->padata_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_PA_ENC_SAM_RESPONSE_ENC.c b/lib/libkrb5/generated/asn1_PA_ENC_SAM_RESPONSE_ENC.c
new file mode 100644
index 00000000000..caee6e48d45
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_ENC_SAM_RESPONSE_ENC.c
@@ -0,0 +1,174 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_ENC_SAM_RESPONSE_ENC(unsigned char *p, size_t len, const PA_ENC_SAM_RESPONSE_ENC *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+if((data)->sam_sad)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_sad, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_nonce, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_ENC_SAM_RESPONSE_ENC(const unsigned char *p, size_t len, PA_ENC_SAM_RESPONSE_ENC *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_nonce, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+(data)->sam_sad = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_sad = malloc(sizeof(*(data)->sam_sad));
+if((data)->sam_sad == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_sad, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_ENC_SAM_RESPONSE_ENC(data);
+return e;
+}
+
+void
+free_PA_ENC_SAM_RESPONSE_ENC(PA_ENC_SAM_RESPONSE_ENC *data)
+{
+if((data)->sam_sad) {
+free_general_string((data)->sam_sad);
+free((data)->sam_sad);
+(data)->sam_sad = NULL;
+}
+}
+
+size_t
+length_PA_ENC_SAM_RESPONSE_ENC(const PA_ENC_SAM_RESPONSE_ENC *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_nonce);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_sad){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_sad);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_PA_ENC_SAM_RESPONSE_ENC(const PA_ENC_SAM_RESPONSE_ENC *from, PA_ENC_SAM_RESPONSE_ENC *to)
+{
+*(&(to)->sam_nonce) = *(&(from)->sam_nonce);
+if((from)->sam_sad) {
+(to)->sam_sad = malloc(sizeof(*(to)->sam_sad));
+if((to)->sam_sad == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_sad, (to)->sam_sad)) return ENOMEM;
+}else
+(to)->sam_sad = NULL;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_ENC_TS_ENC.c b/lib/libkrb5/generated/asn1_PA_ENC_TS_ENC.c
index c4bd3870d8c..d3cc8b26d83 100644
--- a/lib/libkrb5/generated/asn1_PA_ENC_TS_ENC.c
+++ b/lib/libkrb5/generated/asn1_PA_ENC_TS_ENC.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,7 +27,7 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, (data)->pausec, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -36,11 +36,11 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, &(data)->patimestamp, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -57,7 +57,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -66,7 +66,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -92,7 +92,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
(data)->pausec = NULL;
else {
@@ -135,6 +135,7 @@ free_PA_ENC_TS_ENC(PA_ENC_TS_ENC *data)
free_KerberosTime(&(data)->patimestamp);
if((data)->pausec) {
free((data)->pausec);
+(data)->pausec = NULL;
}
}
diff --git a/lib/libkrb5/generated/asn1_PA_PAC_REQUEST.c b/lib/libkrb5/generated/asn1_PA_PAC_REQUEST.c
new file mode 100644
index 00000000000..982e0413813
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_PAC_REQUEST.c
@@ -0,0 +1,119 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_PAC_REQUEST(unsigned char *p, size_t len, const PA_PAC_REQUEST *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_boolean(p, len, &(data)->include_pac, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_PAC_REQUEST(const unsigned char *p, size_t len, PA_PAC_REQUEST *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_boolean(p, len, &(data)->include_pac, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_PAC_REQUEST(data);
+return e;
+}
+
+void
+free_PA_PAC_REQUEST(PA_PAC_REQUEST *data)
+{
+}
+
+size_t
+length_PA_PAC_REQUEST(const PA_PAC_REQUEST *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_boolean(&(data)->include_pac);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_PA_PAC_REQUEST(const PA_PAC_REQUEST *from, PA_PAC_REQUEST *to)
+{
+*(&(to)->include_pac) = *(&(from)->include_pac);
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2.c b/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2.c
new file mode 100644
index 00000000000..f2c0b784c84
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2.c
@@ -0,0 +1,208 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_SAM_CHALLENGE_2(unsigned char *p, size_t len, const PA_SAM_CHALLENGE_2 *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+for(i = (&(data)->sam_cksum)->len - 1; i >= 0; --i) {
+int oldret = ret;
+ret = 0;
+e = encode_Checksum(p, len, &(&(data)->sam_cksum)->val[i], &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_PA_SAM_CHALLENGE_2_BODY(p, len, &(data)->sam_body, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_SAM_CHALLENGE_2(const unsigned char *p, size_t len, PA_SAM_CHALLENGE_2 *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_PA_SAM_CHALLENGE_2_BODY(p, len, &(data)->sam_body, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+if(len < reallen)
+return ASN1_OVERRUN;
+len = reallen;
+{
+size_t origlen = len;
+int oldret = ret;
+ret = 0;
+(&(data)->sam_cksum)->len = 0;
+(&(data)->sam_cksum)->val = NULL;
+while(ret < origlen) {
+(&(data)->sam_cksum)->len++;
+(&(data)->sam_cksum)->val = realloc((&(data)->sam_cksum)->val, sizeof(*((&(data)->sam_cksum)->val)) * (&(data)->sam_cksum)->len);
+e = decode_Checksum(p, len, &(&(data)->sam_cksum)->val[(&(data)->sam_cksum)->len-1], &l);
+FORW;
+len = origlen - ret;
+}
+ret += oldret;
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_SAM_CHALLENGE_2(data);
+return e;
+}
+
+void
+free_PA_SAM_CHALLENGE_2(PA_SAM_CHALLENGE_2 *data)
+{
+free_PA_SAM_CHALLENGE_2_BODY(&(data)->sam_body);
+while((&(data)->sam_cksum)->len){
+free_Checksum(&(&(data)->sam_cksum)->val[(&(data)->sam_cksum)->len-1]);
+(&(data)->sam_cksum)->len--;
+}
+free((&(data)->sam_cksum)->val);
+(&(data)->sam_cksum)->val = NULL;
+}
+
+size_t
+length_PA_SAM_CHALLENGE_2(const PA_SAM_CHALLENGE_2 *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_PA_SAM_CHALLENGE_2_BODY(&(data)->sam_body);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+{
+int oldret = ret;
+int i;
+ret = 0;
+for(i = (&(data)->sam_cksum)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
+ret += length_Checksum(&(&(data)->sam_cksum)->val[i]);
+ret += oldret;
+}
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_PA_SAM_CHALLENGE_2(const PA_SAM_CHALLENGE_2 *from, PA_SAM_CHALLENGE_2 *to)
+{
+if(copy_PA_SAM_CHALLENGE_2_BODY(&(from)->sam_body, &(to)->sam_body)) return ENOMEM;
+if(((&(to)->sam_cksum)->val = malloc((&(from)->sam_cksum)->len * sizeof(*(&(to)->sam_cksum)->val))) == NULL && (&(from)->sam_cksum)->len != 0)
+return ENOMEM;
+for((&(to)->sam_cksum)->len = 0; (&(to)->sam_cksum)->len < (&(from)->sam_cksum)->len; (&(to)->sam_cksum)->len++){
+if(copy_Checksum(&(&(from)->sam_cksum)->val[(&(to)->sam_cksum)->len], &(&(to)->sam_cksum)->val[(&(to)->sam_cksum)->len])) return ENOMEM;
+}
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2_BODY.c b/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2_BODY.c
new file mode 100644
index 00000000000..54c44b7ea36
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_SAM_CHALLENGE_2_BODY.c
@@ -0,0 +1,576 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_SAM_CHALLENGE_2_BODY(unsigned char *p, size_t len, const PA_SAM_CHALLENGE_2_BODY *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_etype, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_nonce, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_pk_for_sad)
+{
+int oldret = ret;
+ret = 0;
+e = encode_EncryptionKey(p, len, (data)->sam_pk_for_sad, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_response_prompt)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_response_prompt, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_challenge)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_challenge, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_challenge_label)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_challenge_label, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_track_id)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_track_id, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_type_name)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_type_name, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_SAMFlags(p, len, &(data)->sam_flags, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_type, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_SAM_CHALLENGE_2_BODY(const unsigned char *p, size_t len, PA_SAM_CHALLENGE_2_BODY *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_type, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_SAMFlags(p, len, &(data)->sam_flags, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
+if (e)
+(data)->sam_type_name = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_type_name = malloc(sizeof(*(data)->sam_type_name));
+if((data)->sam_type_name == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_type_name, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
+if (e)
+(data)->sam_track_id = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_track_id = malloc(sizeof(*(data)->sam_track_id));
+if((data)->sam_track_id == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_track_id, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
+if (e)
+(data)->sam_challenge_label = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_challenge_label = malloc(sizeof(*(data)->sam_challenge_label));
+if((data)->sam_challenge_label == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_challenge_label, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
+if (e)
+(data)->sam_challenge = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_challenge = malloc(sizeof(*(data)->sam_challenge));
+if((data)->sam_challenge == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_challenge, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
+if (e)
+(data)->sam_response_prompt = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_response_prompt = malloc(sizeof(*(data)->sam_response_prompt));
+if((data)->sam_response_prompt == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_response_prompt, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
+if (e)
+(data)->sam_pk_for_sad = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_pk_for_sad = malloc(sizeof(*(data)->sam_pk_for_sad));
+if((data)->sam_pk_for_sad == NULL) return ENOMEM;
+e = decode_EncryptionKey(p, len, (data)->sam_pk_for_sad, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_nonce, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_etype, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_SAM_CHALLENGE_2_BODY(data);
+return e;
+}
+
+void
+free_PA_SAM_CHALLENGE_2_BODY(PA_SAM_CHALLENGE_2_BODY *data)
+{
+free_SAMFlags(&(data)->sam_flags);
+if((data)->sam_type_name) {
+free_general_string((data)->sam_type_name);
+free((data)->sam_type_name);
+(data)->sam_type_name = NULL;
+}
+if((data)->sam_track_id) {
+free_general_string((data)->sam_track_id);
+free((data)->sam_track_id);
+(data)->sam_track_id = NULL;
+}
+if((data)->sam_challenge_label) {
+free_general_string((data)->sam_challenge_label);
+free((data)->sam_challenge_label);
+(data)->sam_challenge_label = NULL;
+}
+if((data)->sam_challenge) {
+free_general_string((data)->sam_challenge);
+free((data)->sam_challenge);
+(data)->sam_challenge = NULL;
+}
+if((data)->sam_response_prompt) {
+free_general_string((data)->sam_response_prompt);
+free((data)->sam_response_prompt);
+(data)->sam_response_prompt = NULL;
+}
+if((data)->sam_pk_for_sad) {
+free_EncryptionKey((data)->sam_pk_for_sad);
+free((data)->sam_pk_for_sad);
+(data)->sam_pk_for_sad = NULL;
+}
+}
+
+size_t
+length_PA_SAM_CHALLENGE_2_BODY(const PA_SAM_CHALLENGE_2_BODY *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_type);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_SAMFlags(&(data)->sam_flags);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_type_name){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_type_name);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_track_id){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_track_id);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_challenge_label){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_challenge_label);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_challenge){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_challenge);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_response_prompt){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_response_prompt);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_pk_for_sad){
+int oldret = ret;
+ret = 0;
+ret += length_EncryptionKey((data)->sam_pk_for_sad);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_nonce);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_etype);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_PA_SAM_CHALLENGE_2_BODY(const PA_SAM_CHALLENGE_2_BODY *from, PA_SAM_CHALLENGE_2_BODY *to)
+{
+*(&(to)->sam_type) = *(&(from)->sam_type);
+if(copy_SAMFlags(&(from)->sam_flags, &(to)->sam_flags)) return ENOMEM;
+if((from)->sam_type_name) {
+(to)->sam_type_name = malloc(sizeof(*(to)->sam_type_name));
+if((to)->sam_type_name == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_type_name, (to)->sam_type_name)) return ENOMEM;
+}else
+(to)->sam_type_name = NULL;
+if((from)->sam_track_id) {
+(to)->sam_track_id = malloc(sizeof(*(to)->sam_track_id));
+if((to)->sam_track_id == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_track_id, (to)->sam_track_id)) return ENOMEM;
+}else
+(to)->sam_track_id = NULL;
+if((from)->sam_challenge_label) {
+(to)->sam_challenge_label = malloc(sizeof(*(to)->sam_challenge_label));
+if((to)->sam_challenge_label == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_challenge_label, (to)->sam_challenge_label)) return ENOMEM;
+}else
+(to)->sam_challenge_label = NULL;
+if((from)->sam_challenge) {
+(to)->sam_challenge = malloc(sizeof(*(to)->sam_challenge));
+if((to)->sam_challenge == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_challenge, (to)->sam_challenge)) return ENOMEM;
+}else
+(to)->sam_challenge = NULL;
+if((from)->sam_response_prompt) {
+(to)->sam_response_prompt = malloc(sizeof(*(to)->sam_response_prompt));
+if((to)->sam_response_prompt == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_response_prompt, (to)->sam_response_prompt)) return ENOMEM;
+}else
+(to)->sam_response_prompt = NULL;
+if((from)->sam_pk_for_sad) {
+(to)->sam_pk_for_sad = malloc(sizeof(*(to)->sam_pk_for_sad));
+if((to)->sam_pk_for_sad == NULL) return ENOMEM;
+if(copy_EncryptionKey((from)->sam_pk_for_sad, (to)->sam_pk_for_sad)) return ENOMEM;
+}else
+(to)->sam_pk_for_sad = NULL;
+*(&(to)->sam_nonce) = *(&(from)->sam_nonce);
+*(&(to)->sam_etype) = *(&(from)->sam_etype);
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_SAM_REDIRECT.c b/lib/libkrb5/generated/asn1_PA_SAM_REDIRECT.c
new file mode 100644
index 00000000000..c2488cad709
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_SAM_REDIRECT.c
@@ -0,0 +1,70 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_SAM_REDIRECT(unsigned char *p, size_t len, const PA_SAM_REDIRECT *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_HostAddresses(p, len, data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_SAM_REDIRECT(const unsigned char *p, size_t len, PA_SAM_REDIRECT *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_HostAddresses(p, len, data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_SAM_REDIRECT(data);
+return e;
+}
+
+void
+free_PA_SAM_REDIRECT(PA_SAM_REDIRECT *data)
+{
+free_HostAddresses(data);
+}
+
+size_t
+length_PA_SAM_REDIRECT(const PA_SAM_REDIRECT *data)
+{
+size_t ret = 0;
+ret += length_HostAddresses(data);
+return ret;
+}
+
+int
+copy_PA_SAM_REDIRECT(const PA_SAM_REDIRECT *from, PA_SAM_REDIRECT *to)
+{
+if(copy_HostAddresses(from, to)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_SAM_RESPONSE_2.c b/lib/libkrb5/generated/asn1_PA_SAM_RESPONSE_2.c
new file mode 100644
index 00000000000..2153ffb85e5
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_SAM_RESPONSE_2.c
@@ -0,0 +1,302 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_SAM_RESPONSE_2(unsigned char *p, size_t len, const PA_SAM_RESPONSE_2 *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_nonce, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_EncryptedData(p, len, &(data)->sam_enc_nonce_or_sad, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
+BACK;
+ret += oldret;
+}
+if((data)->sam_track_id)
+{
+int oldret = ret;
+ret = 0;
+e = encode_general_string(p, len, (data)->sam_track_id, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_SAMFlags(p, len, &(data)->sam_flags, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->sam_type, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_SAM_RESPONSE_2(const unsigned char *p, size_t len, PA_SAM_RESPONSE_2 *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_type, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_SAMFlags(p, len, &(data)->sam_flags, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
+if (e)
+(data)->sam_track_id = NULL;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+(data)->sam_track_id = malloc(sizeof(*(data)->sam_track_id));
+if((data)->sam_track_id == NULL) return ENOMEM;
+e = decode_general_string(p, len, (data)->sam_track_id, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_EncryptedData(p, len, &(data)->sam_enc_nonce_or_sad, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->sam_nonce, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_SAM_RESPONSE_2(data);
+return e;
+}
+
+void
+free_PA_SAM_RESPONSE_2(PA_SAM_RESPONSE_2 *data)
+{
+free_SAMFlags(&(data)->sam_flags);
+if((data)->sam_track_id) {
+free_general_string((data)->sam_track_id);
+free((data)->sam_track_id);
+(data)->sam_track_id = NULL;
+}
+free_EncryptedData(&(data)->sam_enc_nonce_or_sad);
+}
+
+size_t
+length_PA_SAM_RESPONSE_2(const PA_SAM_RESPONSE_2 *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_type);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_SAMFlags(&(data)->sam_flags);
+ret += 1 + length_len(ret) + oldret;
+}
+if((data)->sam_track_id){
+int oldret = ret;
+ret = 0;
+ret += length_general_string((data)->sam_track_id);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_EncryptedData(&(data)->sam_enc_nonce_or_sad);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->sam_nonce);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_PA_SAM_RESPONSE_2(const PA_SAM_RESPONSE_2 *from, PA_SAM_RESPONSE_2 *to)
+{
+*(&(to)->sam_type) = *(&(from)->sam_type);
+if(copy_SAMFlags(&(from)->sam_flags, &(to)->sam_flags)) return ENOMEM;
+if((from)->sam_track_id) {
+(to)->sam_track_id = malloc(sizeof(*(to)->sam_track_id));
+if((to)->sam_track_id == NULL) return ENOMEM;
+if(copy_general_string((from)->sam_track_id, (to)->sam_track_id)) return ENOMEM;
+}else
+(to)->sam_track_id = NULL;
+if(copy_EncryptedData(&(from)->sam_enc_nonce_or_sad, &(to)->sam_enc_nonce_or_sad)) return ENOMEM;
+*(&(to)->sam_nonce) = *(&(from)->sam_nonce);
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_PA_SAM_TYPE.c b/lib/libkrb5/generated/asn1_PA_SAM_TYPE.c
new file mode 100644
index 00000000000..70f47cef01c
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_PA_SAM_TYPE.c
@@ -0,0 +1,69 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_PA_SAM_TYPE(unsigned char *p, size_t len, const PA_SAM_TYPE *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+e = encode_integer(p, len, (const int*)data, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_PA_SAM_TYPE(const unsigned char *p, size_t len, PA_SAM_TYPE *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = decode_integer(p, len, (int*)data, &l);
+FORW;
+if(size) *size = ret;
+return 0;
+fail:
+free_PA_SAM_TYPE(data);
+return e;
+}
+
+void
+free_PA_SAM_TYPE(PA_SAM_TYPE *data)
+{
+}
+
+size_t
+length_PA_SAM_TYPE(const PA_SAM_TYPE *data)
+{
+size_t ret = 0;
+ret += length_integer((const int*)data);
+return ret;
+}
+
+int
+copy_PA_SAM_TYPE(const PA_SAM_TYPE *from, PA_SAM_TYPE *to)
+{
+*(to) = *(from);
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_Principal.c b/lib/libkrb5/generated/asn1_Principal.c
index d0d1f9f359a..13fbef72c3a 100644
--- a/lib/libkrb5/generated/asn1_Principal.c
+++ b/lib/libkrb5/generated/asn1_Principal.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->realm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->name, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_PrincipalName.c b/lib/libkrb5/generated/asn1_PrincipalName.c
index 7151a9470e3..5c201e91270 100644
--- a/lib/libkrb5/generated/asn1_PrincipalName.c
+++ b/lib/libkrb5/generated/asn1_PrincipalName.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -31,9 +31,9 @@ e = encode_general_string(p, len, &(&(data)->name_string)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -42,11 +42,11 @@ int oldret = ret;
ret = 0;
e = encode_NAME_TYPE(p, len, &(data)->name_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -63,7 +63,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -72,7 +72,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -98,7 +98,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -111,7 +111,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -160,6 +160,7 @@ free_general_string(&(&(data)->name_string)->val[(&(data)->name_string)->len-1])
(&(data)->name_string)->len--;
}
free((&(data)->name_string)->val);
+(&(data)->name_string)->val = NULL;
}
size_t
@@ -180,7 +181,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (&(data)->name_string)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_general_string(&(&(data)->name_string)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/asn1_RC2CBCParameter.c b/lib/libkrb5/generated/asn1_RC2CBCParameter.c
new file mode 100644
index 00000000000..8a7a9065517
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_RC2CBCParameter.c
@@ -0,0 +1,162 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_RC2CBCParameter(unsigned char *p, size_t len, const RC2CBCParameter *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+int oldret = ret;
+ret = 0;
+e = encode_octet_string(p, len, &(data)->iv, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
+BACK;
+ret += oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+e = encode_integer(p, len, &(data)->rc2ParameterVersion, &l);
+BACK;
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
+BACK;
+ret += oldret;
+}
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_RC2CBCParameter(const unsigned char *p, size_t len, RC2CBCParameter *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
+FORW;
+{
+int dce_fix;
+if((dce_fix = fix_dce(reallen, &len)) < 0)
+return ASN1_BAD_FORMAT;
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_integer(p, len, &(data)->rc2ParameterVersion, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+{
+size_t newlen, oldlen;
+
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
+if (e)
+return e;
+else {
+p += l;
+len -= l;
+ret += l;
+e = der_get_length (p, len, &newlen, &l);
+FORW;
+{
+int dce_fix;
+oldlen = len;
+if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
+e = decode_octet_string(p, len, &(data)->iv, &l);
+FORW;
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}else
+len = oldlen - newlen;
+}
+}
+}
+if(dce_fix){
+e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
+FORW;
+}
+}
+if(size) *size = ret;
+return 0;
+fail:
+free_RC2CBCParameter(data);
+return e;
+}
+
+void
+free_RC2CBCParameter(RC2CBCParameter *data)
+{
+free_octet_string(&(data)->iv);
+}
+
+size_t
+length_RC2CBCParameter(const RC2CBCParameter *data)
+{
+size_t ret = 0;
+{
+int oldret = ret;
+ret = 0;
+ret += length_integer(&(data)->rc2ParameterVersion);
+ret += 1 + length_len(ret) + oldret;
+}
+{
+int oldret = ret;
+ret = 0;
+ret += length_octet_string(&(data)->iv);
+ret += 1 + length_len(ret) + oldret;
+}
+ret += 1 + length_len(ret);
+return ret;
+}
+
+int
+copy_RC2CBCParameter(const RC2CBCParameter *from, RC2CBCParameter *to)
+{
+*(&(to)->rc2ParameterVersion) = *(&(from)->rc2ParameterVersion);
+if(copy_octet_string(&(from)->iv, &(to)->iv)) return ENOMEM;
+return 0;
+}
+
diff --git a/lib/libkrb5/generated/asn1_Realm.c b/lib/libkrb5/generated/asn1_Realm.c
index 41624038935..fca3ff3ca45 100644
--- a/lib/libkrb5/generated/asn1_Realm.c
+++ b/lib/libkrb5/generated/asn1_Realm.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_SAMFlags.c b/lib/libkrb5/generated/asn1_SAMFlags.c
new file mode 100644
index 00000000000..5aba152a05a
--- /dev/null
+++ b/lib/libkrb5/generated/asn1_SAMFlags.c
@@ -0,0 +1,126 @@
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Do not edit */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <string.h>
+#include <errno.h>
+#include <krb5_asn1.h>
+#include <asn1_err.h>
+#include <der.h>
+#include <parse_units.h>
+
+#define BACK if (e) return e; p -= l; len -= l; ret += l
+
+int
+encode_SAMFlags(unsigned char *p, size_t len, const SAMFlags *data, size_t *size)
+{
+size_t ret = 0;
+size_t l;
+int i, e;
+
+i = 0;
+{
+unsigned char c = 0;
+*p-- = c; len--; ret++;
+c = 0;
+*p-- = c; len--; ret++;
+c = 0;
+*p-- = c; len--; ret++;
+c = 0;
+if(data->must_pk_encrypt_sad) c |= 1<<5;
+if(data->send_encrypted_sad) c |= 1<<6;
+if(data->use_sad_as_key) c |= 1<<7;
+*p-- = c;
+*p-- = 0;
+len -= 2;
+ret += 2;
+}
+
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, PRIM,UT_BitString, &l);
+BACK;
+*size = ret;
+return 0;
+}
+
+#define FORW if(e) goto fail; p += l; len -= l; ret += l
+
+int
+decode_SAMFlags(const unsigned char *p, size_t len, SAMFlags *data, size_t *size)
+{
+size_t ret = 0, reallen;
+size_t l;
+int e;
+
+memset(data, 0, sizeof(*data));
+reallen = 0;
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, PRIM, UT_BitString,&reallen, &l);
+FORW;
+if(len < reallen)
+return ASN1_OVERRUN;
+p++;
+len--;
+reallen--;
+ret++;
+data->use_sad_as_key = (*p >> 7) & 1;
+data->send_encrypted_sad = (*p >> 6) & 1;
+data->must_pk_encrypt_sad = (*p >> 5) & 1;
+p += reallen; len -= reallen; ret += reallen;
+if(size) *size = ret;
+return 0;
+fail:
+free_SAMFlags(data);
+return e;
+}
+
+void
+free_SAMFlags(SAMFlags *data)
+{
+}
+
+size_t
+length_SAMFlags(const SAMFlags *data)
+{
+size_t ret = 0;
+ret += 7;
+return ret;
+}
+
+int
+copy_SAMFlags(const SAMFlags *from, SAMFlags *to)
+{
+*(to) = *(from);
+return 0;
+}
+
+unsigned SAMFlags2int(SAMFlags f)
+{
+unsigned r = 0;
+if(f.use_sad_as_key) r |= (1U << 0);
+if(f.send_encrypted_sad) r |= (1U << 1);
+if(f.must_pk_encrypt_sad) r |= (1U << 2);
+return r;
+}
+
+SAMFlags int2SAMFlags(unsigned n)
+{
+ SAMFlags flags;
+
+ flags.use_sad_as_key = (n >> 0) & 1;
+ flags.send_encrypted_sad = (n >> 1) & 1;
+ flags.must_pk_encrypt_sad = (n >> 2) & 1;
+ return flags;
+}
+
+static struct units SAMFlags_units[] = {
+ {"must_pk_encrypt_sad", 1U << 2},
+ {"send_encrypted_sad", 1U << 1},
+ {"use_sad_as_key", 1U << 0},
+ {NULL, 0}
+};
+
+const struct units * asn1_SAMFlags_units(void){
+return SAMFlags_units;
+}
+
diff --git a/lib/libkrb5/generated/asn1_Salt.c b/lib/libkrb5/generated/asn1_Salt.c
index 8336acdb8ac..e975847b972 100644
--- a/lib/libkrb5/generated/asn1_Salt.c
+++ b/lib/libkrb5/generated/asn1_Salt.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -27,20 +27,20 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->salt, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, &(data)->type, &l);
+e = encode_unsigned(p, len, &(data)->type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -57,7 +57,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -66,7 +66,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -79,7 +79,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = decode_integer(p, len, &(data)->type, &l);
+e = decode_unsigned(p, len, &(data)->type, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -92,7 +92,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -140,7 +140,7 @@ size_t ret = 0;
{
int oldret = ret;
ret = 0;
-ret += length_integer(&(data)->type);
+ret += length_unsigned(&(data)->type);
ret += 1 + length_len(ret) + oldret;
}
{
diff --git a/lib/libkrb5/generated/asn1_TGS_REP.c b/lib/libkrb5/generated/asn1_TGS_REP.c
index d8603ddae0b..fc165d8532c 100644
--- a/lib/libkrb5/generated/asn1_TGS_REP.c
+++ b/lib/libkrb5/generated/asn1_TGS_REP.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_KDC_REP(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 13, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 13, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 13, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 13, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_TGS_REQ.c b/lib/libkrb5/generated/asn1_TGS_REQ.c
index 39bdb2209fa..60e7ca0cf89 100644
--- a/lib/libkrb5/generated/asn1_TGS_REQ.c
+++ b/lib/libkrb5/generated/asn1_TGS_REQ.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -23,7 +23,7 @@ int i, e;
i = 0;
e = encode_KDC_REQ(p, len, data, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 12, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 12, &l);
BACK;
*size = ret;
return 0;
@@ -40,7 +40,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 12, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 12, &reallen, &l);
FORW;
{
int dce_fix;
diff --git a/lib/libkrb5/generated/asn1_Ticket.c b/lib/libkrb5/generated/asn1_Ticket.c
index 9562187ed16..6f23118c6a7 100644
--- a/lib/libkrb5/generated/asn1_Ticket.c
+++ b/lib/libkrb5/generated/asn1_Ticket.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_EncryptedData(p, len, &(data)->enc_part, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -35,7 +35,7 @@ int oldret = ret;
ret = 0;
e = encode_PrincipalName(p, len, &(data)->sname, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
@@ -44,7 +44,7 @@ int oldret = ret;
ret = 0;
e = encode_Realm(p, len, &(data)->realm, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -53,13 +53,13 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->tkt_vno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, APPL, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_APPL, CONS, 1, &l);
BACK;
*size = ret;
return 0;
@@ -76,13 +76,13 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, APPL, CONS, 1, &reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_APPL, CONS, 1, &reallen, &l);
FORW;
{
int dce_fix;
if((dce_fix = fix_dce(reallen, &len)) < 0)
return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -91,7 +91,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -117,7 +117,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -143,7 +143,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -169,7 +169,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_TicketFlags.c b/lib/libkrb5/generated/asn1_TicketFlags.c
index 6e96fe82ecb..beba4c28d85 100644
--- a/lib/libkrb5/generated/asn1_TicketFlags.c
+++ b/lib/libkrb5/generated/asn1_TicketFlags.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -50,7 +50,7 @@ len -= 2;
ret += 2;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, PRIM,UT_BitString, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, PRIM,UT_BitString, &l);
BACK;
*size = ret;
return 0;
@@ -67,7 +67,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, PRIM, UT_BitString,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, PRIM, UT_BitString,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -162,7 +162,7 @@ TicketFlags int2TicketFlags(unsigned n)
return flags;
}
-struct units TicketFlags_units[] = {
+static struct units TicketFlags_units[] = {
{"anonymous", 1U << 14},
{"ok_as_delegate", 1U << 13},
{"transited_policy_checked", 1U << 12},
@@ -181,3 +181,7 @@ struct units TicketFlags_units[] = {
{NULL, 0}
};
+const struct units * asn1_TicketFlags_units(void){
+return TicketFlags_units;
+}
+
diff --git a/lib/libkrb5/generated/asn1_TransitedEncoding.c b/lib/libkrb5/generated/asn1_TransitedEncoding.c
index 1f227005cac..b783b549be1 100644
--- a/lib/libkrb5/generated/asn1_TransitedEncoding.c
+++ b/lib/libkrb5/generated/asn1_TransitedEncoding.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -26,7 +26,7 @@ int oldret = ret;
ret = 0;
e = encode_octet_string(p, len, &(data)->contents, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -35,11 +35,11 @@ int oldret = ret;
ret = 0;
e = encode_integer(p, len, &(data)->tr_type, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -56,7 +56,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -65,7 +65,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
return e;
else {
@@ -91,7 +91,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
diff --git a/lib/libkrb5/generated/asn1_UNSIGNED.c b/lib/libkrb5/generated/asn1_UNSIGNED.c
index 4f365702098..917dde5f772 100644
--- a/lib/libkrb5/generated/asn1_UNSIGNED.c
+++ b/lib/libkrb5/generated/asn1_UNSIGNED.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#include <stdio.h>
diff --git a/lib/libkrb5/generated/asn1_err.c b/lib/libkrb5/generated/asn1_err.c
index 44185d38c3c..6de4d08be6f 100644
--- a/lib/libkrb5/generated/asn1_err.c
+++ b/lib/libkrb5/generated/asn1_err.c
@@ -1,11 +1,11 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/asn1_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/asn1_err.et */
/* $KTH: asn1_err.et,v 1.5 1998/02/16 16:17:17 joda Exp $ */
#include <stddef.h>
#include <com_err.h>
#include "asn1_err.h"
-static const char *text[] = {
+static const char *asn1_error_strings[] = {
/* 000 */ "ASN.1 failed call to system time library",
/* 001 */ "ASN.1 structure is missing a required field",
/* 002 */ "ASN.1 unexpected field number",
@@ -19,12 +19,14 @@ static const char *text[] = {
NULL
};
+#define num_errors 10
+
void initialize_asn1_error_table_r(struct et_list **list)
{
- initialize_error_table_r(list, text, asn1_num_errors, ERROR_TABLE_BASE_asn1);
+ initialize_error_table_r(list, asn1_error_strings, num_errors, ERROR_TABLE_BASE_asn1);
}
void initialize_asn1_error_table(void)
{
- init_error_table(text, ERROR_TABLE_BASE_asn1, asn1_num_errors);
+ init_error_table(asn1_error_strings, ERROR_TABLE_BASE_asn1, num_errors);
}
diff --git a/lib/libkrb5/generated/asn1_err.h b/lib/libkrb5/generated/asn1_err.h
index 47540dcab18..3ffd7101ede 100644
--- a/lib/libkrb5/generated/asn1_err.h
+++ b/lib/libkrb5/generated/asn1_err.h
@@ -1,10 +1,10 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/asn1_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/asn1_err.et */
/* $KTH: asn1_err.et,v 1.5 1998/02/16 16:17:17 joda Exp $ */
#ifndef __asn1_err_h__
#define __asn1_err_h__
-#include <com_err.h>
+struct et_list;
void initialize_asn1_error_table_r(struct et_list **);
@@ -12,8 +12,6 @@ void initialize_asn1_error_table(void);
#define init_asn1_err_tbl initialize_asn1_error_table
typedef enum asn1_error_number{
- ERROR_TABLE_BASE_asn1 = 1859794432,
- asn1_err_base = 1859794432,
ASN1_BAD_TIMEFORMAT = 1859794432,
ASN1_MISSING_FIELD = 1859794433,
ASN1_MISPLACED_FIELD = 1859794434,
@@ -23,8 +21,9 @@ typedef enum asn1_error_number{
ASN1_BAD_ID = 1859794438,
ASN1_BAD_LENGTH = 1859794439,
ASN1_BAD_FORMAT = 1859794440,
- ASN1_PARSE_ERROR = 1859794441,
- asn1_num_errors = 10
+ ASN1_PARSE_ERROR = 1859794441
} asn1_error_number;
+#define ERROR_TABLE_BASE_asn1 1859794432
+
#endif /* __asn1_err_h__ */
diff --git a/lib/libkrb5/generated/asn1_hdb_entry.c b/lib/libkrb5/generated/asn1_hdb_entry.c
index c4525a227b6..e79df0919a5 100644
--- a/lib/libkrb5/generated/asn1_hdb_entry.c
+++ b/lib/libkrb5/generated/asn1_hdb_entry.c
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#include <stdio.h>
@@ -28,7 +28,7 @@ int oldret = ret;
ret = 0;
e = encode_GENERATION(p, len, (data)->generation, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 12, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 12, &l);
BACK;
ret += oldret;
}
@@ -39,13 +39,13 @@ ret = 0;
for(i = ((data)->etypes)->len - 1; i >= 0; --i) {
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, &((data)->etypes)->val[i], &l);
+e = encode_unsigned(p, len, &((data)->etypes)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 11, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 11, &l);
BACK;
ret += oldret;
}
@@ -54,7 +54,7 @@ int oldret = ret;
ret = 0;
e = encode_HDBFlags(p, len, &(data)->flags, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 10, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 10, &l);
BACK;
ret += oldret;
}
@@ -62,9 +62,9 @@ if((data)->max_renew)
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, (data)->max_renew, &l);
+e = encode_unsigned(p, len, (data)->max_renew, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 9, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 9, &l);
BACK;
ret += oldret;
}
@@ -72,9 +72,9 @@ if((data)->max_life)
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, (data)->max_life, &l);
+e = encode_unsigned(p, len, (data)->max_life, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 8, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 8, &l);
BACK;
ret += oldret;
}
@@ -84,7 +84,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->pw_end, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 7, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 7, &l);
BACK;
ret += oldret;
}
@@ -94,7 +94,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->valid_end, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 6, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 6, &l);
BACK;
ret += oldret;
}
@@ -104,7 +104,7 @@ int oldret = ret;
ret = 0;
e = encode_KerberosTime(p, len, (data)->valid_start, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 5, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 5, &l);
BACK;
ret += oldret;
}
@@ -114,7 +114,7 @@ int oldret = ret;
ret = 0;
e = encode_Event(p, len, (data)->modified_by, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 4, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 4, &l);
BACK;
ret += oldret;
}
@@ -123,7 +123,7 @@ int oldret = ret;
ret = 0;
e = encode_Event(p, len, &(data)->created_by, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 3, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 3, &l);
BACK;
ret += oldret;
}
@@ -137,18 +137,18 @@ e = encode_Key(p, len, &(&(data)->keys)->val[i], &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 2, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 2, &l);
BACK;
ret += oldret;
}
{
int oldret = ret;
ret = 0;
-e = encode_integer(p, len, &(data)->kvno, &l);
+e = encode_unsigned(p, len, &(data)->kvno, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 1, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 1, &l);
BACK;
ret += oldret;
}
@@ -158,11 +158,11 @@ int oldret = ret;
ret = 0;
e = encode_Principal(p, len, (data)->principal, &l);
BACK;
-e = der_put_length_and_tag (p, len, ret, CONTEXT, CONS, 0, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_CONTEXT, CONS, 0, &l);
BACK;
ret += oldret;
}
-e = der_put_length_and_tag (p, len, ret, UNIV, CONS, UT_Sequence, &l);
+e = der_put_length_and_tag (p, len, ret, ASN1_C_UNIV, CONS, UT_Sequence, &l);
BACK;
*size = ret;
return 0;
@@ -179,7 +179,7 @@ int e;
memset(data, 0, sizeof(*data));
reallen = 0;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
{
int dce_fix;
@@ -188,7 +188,7 @@ return ASN1_BAD_FORMAT;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 0, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 0, &l);
if (e)
(data)->principal = NULL;
else {
@@ -216,7 +216,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 1, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 1, &l);
if (e)
return e;
else {
@@ -229,7 +229,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = decode_integer(p, len, &(data)->kvno, &l);
+e = decode_unsigned(p, len, &(data)->kvno, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -242,7 +242,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 2, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 2, &l);
if (e)
return e;
else {
@@ -255,7 +255,7 @@ FORW;
int dce_fix;
oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -286,7 +286,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 3, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 3, &l);
if (e)
return e;
else {
@@ -312,7 +312,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 4, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 4, &l);
if (e)
(data)->modified_by = NULL;
else {
@@ -340,7 +340,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 5, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 5, &l);
if (e)
(data)->valid_start = NULL;
else {
@@ -368,7 +368,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 6, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 6, &l);
if (e)
(data)->valid_end = NULL;
else {
@@ -396,7 +396,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 7, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 7, &l);
if (e)
(data)->pw_end = NULL;
else {
@@ -424,7 +424,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 8, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 8, &l);
if (e)
(data)->max_life = NULL;
else {
@@ -439,7 +439,7 @@ oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
(data)->max_life = malloc(sizeof(*(data)->max_life));
if((data)->max_life == NULL) return ENOMEM;
-e = decode_integer(p, len, (data)->max_life, &l);
+e = decode_unsigned(p, len, (data)->max_life, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -452,7 +452,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 9, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 9, &l);
if (e)
(data)->max_renew = NULL;
else {
@@ -467,7 +467,7 @@ oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
(data)->max_renew = malloc(sizeof(*(data)->max_renew));
if((data)->max_renew == NULL) return ENOMEM;
-e = decode_integer(p, len, (data)->max_renew, &l);
+e = decode_unsigned(p, len, (data)->max_renew, &l);
FORW;
if(dce_fix){
e = der_match_tag_and_length (p, len, (Der_class)0, (Der_type)0, 0, &reallen, &l);
@@ -480,7 +480,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 10, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 10, &l);
if (e)
return e;
else {
@@ -506,7 +506,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 11, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 11, &l);
if (e)
(data)->etypes = NULL;
else {
@@ -521,7 +521,7 @@ oldlen = len;
if((dce_fix = fix_dce(newlen, &len)) < 0)return ASN1_BAD_FORMAT;
(data)->etypes = malloc(sizeof(*(data)->etypes));
if((data)->etypes == NULL) return ENOMEM;
-e = der_match_tag_and_length (p, len, UNIV, CONS, UT_Sequence,&reallen, &l);
+e = der_match_tag_and_length (p, len, ASN1_C_UNIV, CONS, UT_Sequence,&reallen, &l);
FORW;
if(len < reallen)
return ASN1_OVERRUN;
@@ -535,7 +535,7 @@ ret = 0;
while(ret < origlen) {
((data)->etypes)->len++;
((data)->etypes)->val = realloc(((data)->etypes)->val, sizeof(*(((data)->etypes)->val)) * ((data)->etypes)->len);
-e = decode_integer(p, len, &((data)->etypes)->val[((data)->etypes)->len-1], &l);
+e = decode_unsigned(p, len, &((data)->etypes)->val[((data)->etypes)->len-1], &l);
FORW;
len = origlen - ret;
}
@@ -552,7 +552,7 @@ len = oldlen - newlen;
{
size_t newlen, oldlen;
-e = der_match_tag (p, len, CONTEXT, CONS, 12, &l);
+e = der_match_tag (p, len, ASN1_C_CONTEXT, CONS, 12, &l);
if (e)
(data)->generation = NULL;
else {
@@ -595,34 +595,42 @@ free_hdb_entry(hdb_entry *data)
if((data)->principal) {
free_Principal((data)->principal);
free((data)->principal);
+(data)->principal = NULL;
}
while((&(data)->keys)->len){
free_Key(&(&(data)->keys)->val[(&(data)->keys)->len-1]);
(&(data)->keys)->len--;
}
free((&(data)->keys)->val);
+(&(data)->keys)->val = NULL;
free_Event(&(data)->created_by);
if((data)->modified_by) {
free_Event((data)->modified_by);
free((data)->modified_by);
+(data)->modified_by = NULL;
}
if((data)->valid_start) {
free_KerberosTime((data)->valid_start);
free((data)->valid_start);
+(data)->valid_start = NULL;
}
if((data)->valid_end) {
free_KerberosTime((data)->valid_end);
free((data)->valid_end);
+(data)->valid_end = NULL;
}
if((data)->pw_end) {
free_KerberosTime((data)->pw_end);
free((data)->pw_end);
+(data)->pw_end = NULL;
}
if((data)->max_life) {
free((data)->max_life);
+(data)->max_life = NULL;
}
if((data)->max_renew) {
free((data)->max_renew);
+(data)->max_renew = NULL;
}
free_HDBFlags(&(data)->flags);
if((data)->etypes) {
@@ -630,11 +638,14 @@ while(((data)->etypes)->len){
((data)->etypes)->len--;
}
free(((data)->etypes)->val);
+((data)->etypes)->val = NULL;
free((data)->etypes);
+(data)->etypes = NULL;
}
if((data)->generation) {
free_GENERATION((data)->generation);
free((data)->generation);
+(data)->generation = NULL;
}
}
@@ -651,7 +662,7 @@ ret += 1 + length_len(ret) + oldret;
{
int oldret = ret;
ret = 0;
-ret += length_integer(&(data)->kvno);
+ret += length_unsigned(&(data)->kvno);
ret += 1 + length_len(ret) + oldret;
}
{
@@ -662,7 +673,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = (&(data)->keys)->len - 1; i >= 0; --i){
+int oldret = ret;
+ret = 0;
ret += length_Key(&(&(data)->keys)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
@@ -701,13 +715,13 @@ ret += 1 + length_len(ret) + oldret;
if((data)->max_life){
int oldret = ret;
ret = 0;
-ret += length_integer((data)->max_life);
+ret += length_unsigned((data)->max_life);
ret += 1 + length_len(ret) + oldret;
}
if((data)->max_renew){
int oldret = ret;
ret = 0;
-ret += length_integer((data)->max_renew);
+ret += length_unsigned((data)->max_renew);
ret += 1 + length_len(ret) + oldret;
}
{
@@ -724,7 +738,10 @@ int oldret = ret;
int i;
ret = 0;
for(i = ((data)->etypes)->len - 1; i >= 0; --i){
-ret += length_integer(&((data)->etypes)->val[i]);
+int oldret = ret;
+ret = 0;
+ret += length_unsigned(&((data)->etypes)->val[i]);
+ret += oldret;
}
ret += 1 + length_len(ret) + oldret;
}
diff --git a/lib/libkrb5/generated/hdb_asn1.h b/lib/libkrb5/generated/hdb_asn1.h
index a61cf1baa4d..5196c0e5a8f 100644
--- a/lib/libkrb5/generated/hdb_asn1.h
+++ b/lib/libkrb5/generated/hdb_asn1.h
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb.asn1 */
/* Do not edit */
#ifndef __hdb_asn1_h__
@@ -12,17 +12,19 @@ time_t timegm (struct tm*);
#ifndef __asn1_common_definitions__
#define __asn1_common_definitions__
-typedef struct octet_string {
+typedef struct heim_octet_string {
size_t length;
void *data;
-} octet_string;
+} heim_octet_string;
-typedef char *general_string;
+typedef char *heim_general_string;
-typedef struct oid {
+typedef char *heim_utf8_string;
+
+typedef struct heim_oid {
size_t length;
unsigned *components;
-} oid;
+} heim_oid;
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \
do { \
@@ -50,14 +52,14 @@ enum { hdb_afs3_salt = 10 };
/*
Salt ::= SEQUENCE {
- type[0] INTEGER,
+ type[0] UNSIGNED INTEGER,
salt[1] OCTET STRING
}
*/
typedef struct Salt {
- int type;
- octet_string salt;
+ unsigned int type;
+ heim_octet_string salt;
} Salt;
int encode_Salt(unsigned char *, size_t, const Salt *, size_t *);
@@ -69,14 +71,14 @@ int copy_Salt (const Salt *, Salt *);
/*
Key ::= SEQUENCE {
- mkvno[0] INTEGER OPTIONAL,
+ mkvno[0] UNSIGNED INTEGER OPTIONAL,
key[1] EncryptionKey,
salt[2] Salt OPTIONAL
}
*/
typedef struct Key {
- int *mkvno;
+ unsigned int *mkvno;
EncryptionKey key;
Salt *salt;
} Key;
@@ -151,20 +153,20 @@ size_t length_HDBFlags(const HDBFlags *);
int copy_HDBFlags (const HDBFlags *, HDBFlags *);
unsigned HDBFlags2int(HDBFlags);
HDBFlags int2HDBFlags(unsigned);
-extern struct units HDBFlags_units[];
+const struct units * asn1_HDBFlags_units(void);
/*
GENERATION ::= SEQUENCE {
time[0] KerberosTime,
- usec[1] INTEGER,
- gen[2] INTEGER
+ usec[1] UNSIGNED INTEGER,
+ gen[2] UNSIGNED INTEGER
}
*/
typedef struct GENERATION {
KerberosTime time;
- int usec;
- int gen;
+ unsigned int usec;
+ unsigned int gen;
} GENERATION;
int encode_GENERATION(unsigned char *, size_t, const GENERATION *, size_t *);
@@ -177,24 +179,24 @@ int copy_GENERATION (const GENERATION *, GENERATION *);
/*
hdb_entry ::= SEQUENCE {
principal[0] Principal OPTIONAL,
- kvno[1] INTEGER,
+ kvno[1] UNSIGNED INTEGER,
keys[2] SEQUENCE OF Key,
created-by[3] Event,
modified-by[4] Event OPTIONAL,
valid-start[5] KerberosTime OPTIONAL,
valid-end[6] KerberosTime OPTIONAL,
pw-end[7] KerberosTime OPTIONAL,
- max-life[8] INTEGER OPTIONAL,
- max-renew[9] INTEGER OPTIONAL,
+ max-life[8] UNSIGNED INTEGER OPTIONAL,
+ max-renew[9] UNSIGNED INTEGER OPTIONAL,
flags[10] HDBFlags,
- etypes[11] SEQUENCE OF INTEGER OPTIONAL,
+ etypes[11] SEQUENCE OF UNSIGNED INTEGER OPTIONAL,
generation[12] GENERATION OPTIONAL
}
*/
typedef struct hdb_entry {
Principal *principal;
- int kvno;
+ unsigned int kvno;
struct {
unsigned int len;
Key *val;
@@ -204,12 +206,12 @@ typedef struct hdb_entry {
KerberosTime *valid_start;
KerberosTime *valid_end;
KerberosTime *pw_end;
- int *max_life;
- int *max_renew;
+ unsigned int *max_life;
+ unsigned int *max_renew;
HDBFlags flags;
struct {
unsigned int len;
- int *val;
+ unsigned int *val;
} *etypes;
GENERATION *generation;
} hdb_entry;
diff --git a/lib/libkrb5/generated/hdb_err.c b/lib/libkrb5/generated/hdb_err.c
index dcf46f76368..d8509e790aa 100644
--- a/lib/libkrb5/generated/hdb_err.c
+++ b/lib/libkrb5/generated/hdb_err.c
@@ -1,11 +1,11 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb_err.et */
/* $KTH: hdb_err.et,v 1.5 2001/01/28 23:05:52 assar Exp $ */
#include <stddef.h>
#include <com_err.h>
#include "hdb_err.h"
-static const char *text[] = {
+static const char *hdb_error_strings[] = {
/* 000 */ "Reserved hdb error (0)",
/* 001 */ "Database store error",
/* 002 */ "Database read error",
@@ -22,12 +22,14 @@ static const char *text[] = {
NULL
};
+#define num_errors 13
+
void initialize_hdb_error_table_r(struct et_list **list)
{
- initialize_error_table_r(list, text, hdb_num_errors, ERROR_TABLE_BASE_hdb);
+ initialize_error_table_r(list, hdb_error_strings, num_errors, ERROR_TABLE_BASE_hdb);
}
void initialize_hdb_error_table(void)
{
- init_error_table(text, ERROR_TABLE_BASE_hdb, hdb_num_errors);
+ init_error_table(hdb_error_strings, ERROR_TABLE_BASE_hdb, num_errors);
}
diff --git a/lib/libkrb5/generated/hdb_err.h b/lib/libkrb5/generated/hdb_err.h
index b0cfa9f279f..ea2cdd44acf 100644
--- a/lib/libkrb5/generated/hdb_err.h
+++ b/lib/libkrb5/generated/hdb_err.h
@@ -1,10 +1,10 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/hdb/hdb_err.et */
/* $KTH: hdb_err.et,v 1.5 2001/01/28 23:05:52 assar Exp $ */
#ifndef __hdb_err_h__
#define __hdb_err_h__
-#include <com_err.h>
+struct et_list;
void initialize_hdb_error_table_r(struct et_list **);
@@ -12,8 +12,6 @@ void initialize_hdb_error_table(void);
#define init_hdb_err_tbl initialize_hdb_error_table
typedef enum hdb_error_number{
- ERROR_TABLE_BASE_hdb = 36150272,
- hdb_err_base = 36150272,
HDB_ERR_UK_SERROR = 36150273,
HDB_ERR_UK_RERROR = 36150274,
HDB_ERR_NOENTRY = 36150275,
@@ -25,8 +23,9 @@ typedef enum hdb_error_number{
HDB_ERR_CANT_LOCK_DB = 36150281,
HDB_ERR_EXISTS = 36150282,
HDB_ERR_BADVERSION = 36150283,
- HDB_ERR_NO_MKEY = 36150284,
- hdb_num_errors = 13
+ HDB_ERR_NO_MKEY = 36150284
} hdb_error_number;
+#define ERROR_TABLE_BASE_hdb 36150272
+
#endif /* __hdb_err_h__ */
diff --git a/lib/libkrb5/generated/heim_err.c b/lib/libkrb5/generated/heim_err.c
index a4b6b7e7039..e80fd3b0e68 100644
--- a/lib/libkrb5/generated/heim_err.c
+++ b/lib/libkrb5/generated/heim_err.c
@@ -1,11 +1,11 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/heim_err.et */
-/* $KTH: heim_err.et,v 1.12 2001/06/21 03:51:36 assar Exp $ */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/heim_err.et */
+/* $KTH: heim_err.et,v 1.13 2004/02/13 16:23:40 lha Exp $ */
#include <stddef.h>
#include <com_err.h>
#include "heim_err.h"
-static const char *text[] = {
+static const char *heim_error_strings[] = {
/* 000 */ "Error parsing log destination",
/* 001 */ "Failed to convert v4 principal",
/* 002 */ "Salt type is not supported by enctype",
@@ -70,11 +70,11 @@ static const char *text[] = {
/* 061 */ "Reserved heim error (61)",
/* 062 */ "Reserved heim error (62)",
/* 063 */ "Reserved heim error (63)",
- /* 064 */ "Reserved heim error (64)",
- /* 065 */ "Reserved heim error (65)",
- /* 066 */ "Reserved heim error (66)",
- /* 067 */ "Reserved heim error (67)",
- /* 068 */ "Reserved heim error (68)",
+ /* 064 */ "Certificate missing",
+ /* 065 */ "Private key missing",
+ /* 066 */ "No valid certificate authority",
+ /* 067 */ "Certificate invalid",
+ /* 068 */ "Private key invalid",
/* 069 */ "Reserved heim error (69)",
/* 070 */ "Reserved heim error (70)",
/* 071 */ "Reserved heim error (71)",
@@ -149,12 +149,14 @@ static const char *text[] = {
NULL
};
+#define num_errors 140
+
void initialize_heim_error_table_r(struct et_list **list)
{
- initialize_error_table_r(list, text, heim_num_errors, ERROR_TABLE_BASE_heim);
+ initialize_error_table_r(list, heim_error_strings, num_errors, ERROR_TABLE_BASE_heim);
}
void initialize_heim_error_table(void)
{
- init_error_table(text, ERROR_TABLE_BASE_heim, heim_num_errors);
+ init_error_table(heim_error_strings, ERROR_TABLE_BASE_heim, num_errors);
}
diff --git a/lib/libkrb5/generated/heim_err.h b/lib/libkrb5/generated/heim_err.h
index 853e62fe50d..d4f03422c8f 100644
--- a/lib/libkrb5/generated/heim_err.h
+++ b/lib/libkrb5/generated/heim_err.h
@@ -1,10 +1,10 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/heim_err.et */
-/* $KTH: heim_err.et,v 1.12 2001/06/21 03:51:36 assar Exp $ */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/heim_err.et */
+/* $KTH: heim_err.et,v 1.13 2004/02/13 16:23:40 lha Exp $ */
#ifndef __heim_err_h__
#define __heim_err_h__
-#include <com_err.h>
+struct et_list;
void initialize_heim_error_table_r(struct et_list **);
@@ -12,8 +12,6 @@ void initialize_heim_error_table(void);
#define init_heim_err_tbl initialize_heim_error_table
typedef enum heim_error_number{
- ERROR_TABLE_BASE_heim = -1980176640,
- heim_err_base = -1980176640,
HEIM_ERR_LOG_PARSE = -1980176640,
HEIM_ERR_V4_PRINC_NO_CONV = -1980176639,
HEIM_ERR_SALTTYPE_NOSUPP = -1980176638,
@@ -22,6 +20,11 @@ typedef enum heim_error_number{
HEIM_ERR_EOF = -1980176635,
HEIM_ERR_BAD_MKEY = -1980176634,
HEIM_ERR_SERVICE_NOMATCH = -1980176633,
+ HEIM_PKINIT_NO_CERTIFICATE = -1980176576,
+ HEIM_PKINIT_NO_PRIVATE_KEY = -1980176575,
+ HEIM_PKINIT_NO_VALID_CA = -1980176574,
+ HEIM_PKINIT_CERTIFICATE_INVALID = -1980176573,
+ HEIM_PKINIT_PRIVATE_KEY_INVALID = -1980176572,
HEIM_EAI_UNKNOWN = -1980176512,
HEIM_EAI_ADDRFAMILY = -1980176511,
HEIM_EAI_AGAIN = -1980176510,
@@ -33,8 +36,9 @@ typedef enum heim_error_number{
HEIM_EAI_NONAME = -1980176504,
HEIM_EAI_SERVICE = -1980176503,
HEIM_EAI_SOCKTYPE = -1980176502,
- HEIM_EAI_SYSTEM = -1980176501,
- heim_num_errors = 140
+ HEIM_EAI_SYSTEM = -1980176501
} heim_error_number;
+#define ERROR_TABLE_BASE_heim -1980176640
+
#endif /* __heim_err_h__ */
diff --git a/lib/libkrb5/generated/k524_err.c b/lib/libkrb5/generated/k524_err.c
index c85cadf3286..ec8f00bac42 100644
--- a/lib/libkrb5/generated/k524_err.c
+++ b/lib/libkrb5/generated/k524_err.c
@@ -1,11 +1,11 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/k524_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/k524_err.et */
/* $KTH: k524_err.et,v 1.1 2001/06/20 02:44:11 joda Exp $ */
#include <stddef.h>
#include <com_err.h>
#include "k524_err.h"
-static const char *text[] = {
+static const char *k524_error_strings[] = {
/* 000 */ "wrong keytype in ticket",
/* 001 */ "incorrect network address",
/* 002 */ "cannot convert V5 principal",
@@ -17,12 +17,14 @@ static const char *text[] = {
NULL
};
+#define num_errors 8
+
void initialize_k524_error_table_r(struct et_list **list)
{
- initialize_error_table_r(list, text, k524_num_errors, ERROR_TABLE_BASE_k524);
+ initialize_error_table_r(list, k524_error_strings, num_errors, ERROR_TABLE_BASE_k524);
}
void initialize_k524_error_table(void)
{
- init_error_table(text, ERROR_TABLE_BASE_k524, k524_num_errors);
+ init_error_table(k524_error_strings, ERROR_TABLE_BASE_k524, num_errors);
}
diff --git a/lib/libkrb5/generated/k524_err.h b/lib/libkrb5/generated/k524_err.h
index d864645cbba..87c7af91101 100644
--- a/lib/libkrb5/generated/k524_err.h
+++ b/lib/libkrb5/generated/k524_err.h
@@ -1,10 +1,10 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/k524_err.et */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/k524_err.et */
/* $KTH: k524_err.et,v 1.1 2001/06/20 02:44:11 joda Exp $ */
#ifndef __k524_err_h__
#define __k524_err_h__
-#include <com_err.h>
+struct et_list;
void initialize_k524_error_table_r(struct et_list **);
@@ -12,8 +12,6 @@ void initialize_k524_error_table(void);
#define init_k524_err_tbl initialize_k524_error_table
typedef enum k524_error_number{
- ERROR_TABLE_BASE_k524 = -1750206208,
- k524_err_base = -1750206208,
KRB524_BADKEY = -1750206208,
KRB524_BADADDR = -1750206207,
KRB524_BADPRINC = -1750206206,
@@ -21,8 +19,9 @@ typedef enum k524_error_number{
KRB524_V4ERR = -1750206204,
KRB524_ENCFULL = -1750206203,
KRB524_DECEMPTY = -1750206202,
- KRB524_NOTRESP = -1750206201,
- k524_num_errors = 8
+ KRB524_NOTRESP = -1750206201
} k524_error_number;
+#define ERROR_TABLE_BASE_k524 -1750206208
+
#endif /* __k524_err_h__ */
diff --git a/lib/libkrb5/generated/krb5_asn1.h b/lib/libkrb5/generated/krb5_asn1.h
index 06c4b112f42..918f7d019fd 100644
--- a/lib/libkrb5/generated/krb5_asn1.h
+++ b/lib/libkrb5/generated/krb5_asn1.h
@@ -1,4 +1,4 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/asn1/k5.asn1 */
/* Do not edit */
#ifndef __krb5_asn1_h__
@@ -12,17 +12,19 @@ time_t timegm (struct tm*);
#ifndef __asn1_common_definitions__
#define __asn1_common_definitions__
-typedef struct octet_string {
+typedef struct heim_octet_string {
size_t length;
void *data;
-} octet_string;
+} heim_octet_string;
-typedef char *general_string;
+typedef char *heim_general_string;
-typedef struct oid {
+typedef char *heim_utf8_string;
+
+typedef struct heim_oid {
size_t length;
unsigned *components;
-} oid;
+} heim_oid;
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \
do { \
@@ -53,7 +55,8 @@ typedef enum NAME_TYPE {
KRB5_NT_SRV_HST = 3,
KRB5_NT_SRV_XHST = 4,
KRB5_NT_UID = 5,
- KRB5_NT_X500_PRINCIPAL = 6
+ KRB5_NT_X500_PRINCIPAL = 6,
+ KRB5_NT_ENTERPRISE = 10
} NAME_TYPE;
int encode_NAME_TYPE(unsigned char *, size_t, const NAME_TYPE *, size_t *);
@@ -106,16 +109,24 @@ typedef enum PADATA_TYPE {
KRB5_PADATA_ETYPE_INFO = 11,
KRB5_PADATA_SAM_CHALLENGE = 12,
KRB5_PADATA_SAM_RESPONSE = 13,
- KRB5_PADATA_PK_AS_REQ = 14,
- KRB5_PADATA_PK_AS_REP = 15,
- KRB5_PADATA_PK_AS_SIGN = 16,
- KRB5_PADATA_PK_KEY_REQ = 17,
- KRB5_PADATA_PK_KEY_REP = 18,
+ KRB5_PADATA_PK_AS_REQ_19 = 14,
+ KRB5_PADATA_PK_AS_REP_19 = 15,
+ KRB5_PADATA_PK_AS_REQ = 16,
+ KRB5_PADATA_PK_AS_REP = 17,
KRB5_PADATA_ETYPE_INFO2 = 19,
KRB5_PADATA_USE_SPECIFIED_KVNO = 20,
KRB5_PADATA_SAM_REDIRECT = 21,
KRB5_PADATA_GET_FROM_TYPED_DATA = 22,
- KRB5_PADATA_SAM_ETYPE_INFO = 23
+ KRB5_PADATA_SAM_ETYPE_INFO = 23,
+ KRB5_PADATA_SERVER_REFERRAL = 25,
+ KRB5_PADATA_TD_KRB_PRINCIPAL = 102,
+ KRB5_PADATA_TD_KRB_REALM = 103,
+ KRB5_PADATA_PK_TD_TRUSTED_CERTIFIERS = 104,
+ KRB5_PADATA_PK_TD_CERTIFICATE_INDEX = 105,
+ KRB5_PADATA_TD_APP_DEFINED_ERROR = 106,
+ KRB5_PADATA_TD_REQ_NONCE = 107,
+ KRB5_PADATA_TD_REQ_SEQ = 108,
+ KRB5_PADATA_PA_PAC_REQUEST = 128
} PADATA_TYPE;
int encode_PADATA_TYPE(unsigned char *, size_t, const PADATA_TYPE *, size_t *);
@@ -126,6 +137,33 @@ int copy_PADATA_TYPE (const PADATA_TYPE *, PADATA_TYPE *);
/*
+AUTHDATA-TYPE ::= INTEGER
+*/
+
+typedef enum AUTHDATA_TYPE {
+ KRB5_AUTHDATA_IF_RELEVANT = 1,
+ KRB5_AUTHDATA_INTENDED_FOR_SERVER = 2,
+ KRB5_AUTHDATA_INTENDED_FOR_APPLICATION_CLASS = 3,
+ KRB5_AUTHDATA_KDC_ISSUED = 4,
+ KRB5_AUTHDATA_AND_OR = 5,
+ KRB5_AUTHDATA_MANDATORY_TICKET_EXTENSIONS = 6,
+ KRB5_AUTHDATA_IN_TICKET_EXTENSIONS = 7,
+ KRB5_AUTHDATA_MANDATORY_FOR_KDC = 8,
+ KRB5_AUTHDATA_OSF_DCE = 64,
+ KRB5_AUTHDATA_SESAME = 65,
+ KRB5_AUTHDATA_OSF_DCE_PKI_CERTID = 66,
+ KRB5_AUTHDATA_WIN2K_PAC = 128,
+ KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION = 129
+} AUTHDATA_TYPE;
+
+int encode_AUTHDATA_TYPE(unsigned char *, size_t, const AUTHDATA_TYPE *, size_t *);
+int decode_AUTHDATA_TYPE(const unsigned char *, size_t, AUTHDATA_TYPE *, size_t *);
+void free_AUTHDATA_TYPE (AUTHDATA_TYPE *);
+size_t length_AUTHDATA_TYPE(const AUTHDATA_TYPE *);
+int copy_AUTHDATA_TYPE (const AUTHDATA_TYPE *, AUTHDATA_TYPE *);
+
+
+/*
CKSUMTYPE ::= INTEGER
*/
@@ -140,10 +178,11 @@ typedef enum CKSUMTYPE {
CKSUMTYPE_RSA_MD5 = 7,
CKSUMTYPE_RSA_MD5_DES = 8,
CKSUMTYPE_RSA_MD5_DES3 = 9,
- CKSUMTYPE_HMAC_SHA1_96_AES_128 = 10,
- CKSUMTYPE_HMAC_SHA1_96_AES_256 = 11,
+ CKSUMTYPE_SHA1_OTHER = 10,
CKSUMTYPE_HMAC_SHA1_DES3 = 12,
- CKSUMTYPE_SHA1 = 1000,
+ CKSUMTYPE_SHA1 = 14,
+ CKSUMTYPE_HMAC_SHA1_96_AES_128 = 15,
+ CKSUMTYPE_HMAC_SHA1_96_AES_256 = 16,
CKSUMTYPE_GSSAPI = 32771,
CKSUMTYPE_HMAC_MD5 = -138,
CKSUMTYPE_HMAC_MD5_ENC = -1138
@@ -179,7 +218,14 @@ typedef enum ENCTYPE {
ETYPE_DES_CBC_NONE = -4096,
ETYPE_DES3_CBC_NONE = -4097,
ETYPE_DES_CFB64_NONE = -4098,
- ETYPE_DES_PCBC_NONE = -4099
+ ETYPE_DES_PCBC_NONE = -4099,
+ ETYPE_DIGEST_MD5_NONE = -4100,
+ ETYPE_CRAM_MD5_NONE = -4101,
+ ETYPE_RC2_CBC_NONE = -4102,
+ ETYPE_AES128_CBC_NONE = -4103,
+ ETYPE_AES192_CBC_NONE = -4104,
+ ETYPE_AES256_CBC_NONE = -4105,
+ ETYPE_DES3_CBC_NONE_CMS = -4106
} ENCTYPE;
int encode_ENCTYPE(unsigned char *, size_t, const ENCTYPE *, size_t *);
@@ -203,10 +249,23 @@ int copy_UNSIGNED (const UNSIGNED *, UNSIGNED *);
/*
+KerberosString ::= GeneralString
+*/
+
+typedef heim_general_string KerberosString;
+
+int encode_KerberosString(unsigned char *, size_t, const KerberosString *, size_t *);
+int decode_KerberosString(const unsigned char *, size_t, KerberosString *, size_t *);
+void free_KerberosString (KerberosString *);
+size_t length_KerberosString(const KerberosString *);
+int copy_KerberosString (const KerberosString *, KerberosString *);
+
+
+/*
Realm ::= GeneralString
*/
-typedef general_string Realm;
+typedef heim_general_string Realm;
int encode_Realm(unsigned char *, size_t, const Realm *, size_t *);
int decode_Realm(const unsigned char *, size_t, Realm *, size_t *);
@@ -226,7 +285,7 @@ typedef struct PrincipalName {
NAME_TYPE name_type;
struct {
unsigned int len;
- general_string *val;
+ heim_general_string *val;
} name_string;
} PrincipalName;
@@ -265,7 +324,7 @@ HostAddress ::= SEQUENCE {
typedef struct HostAddress {
int addr_type;
- octet_string address;
+ heim_octet_string address;
} HostAddress;
int encode_HostAddress(unsigned char *, size_t, const HostAddress *, size_t *);
@@ -315,7 +374,7 @@ typedef struct AuthorizationData {
unsigned int len;
struct {
int ad_type;
- octet_string ad_data;
+ heim_octet_string ad_data;
} *val;
} AuthorizationData;
@@ -348,7 +407,7 @@ size_t length_APOptions(const APOptions *);
int copy_APOptions (const APOptions *, APOptions *);
unsigned APOptions2int(APOptions);
APOptions int2APOptions(unsigned);
-extern struct units APOptions_units[];
+const struct units * asn1_APOptions_units(void);
/*
TicketFlags ::= BIT STRING {
@@ -396,7 +455,7 @@ size_t length_TicketFlags(const TicketFlags *);
int copy_TicketFlags (const TicketFlags *, TicketFlags *);
unsigned TicketFlags2int(TicketFlags);
TicketFlags int2TicketFlags(unsigned);
-extern struct units TicketFlags_units[];
+const struct units * asn1_TicketFlags_units(void);
/*
KDCOptions ::= BIT STRING {
@@ -452,7 +511,7 @@ size_t length_KDCOptions(const KDCOptions *);
int copy_KDCOptions (const KDCOptions *, KDCOptions *);
unsigned KDCOptions2int(KDCOptions);
KDCOptions int2KDCOptions(unsigned);
-extern struct units KDCOptions_units[];
+const struct units * asn1_KDCOptions_units(void);
/*
LR-TYPE ::= INTEGER
@@ -509,7 +568,7 @@ EncryptedData ::= SEQUENCE {
typedef struct EncryptedData {
ENCTYPE etype;
int *kvno;
- octet_string cipher;
+ heim_octet_string cipher;
} EncryptedData;
int encode_EncryptedData(unsigned char *, size_t, const EncryptedData *, size_t *);
@@ -528,7 +587,7 @@ EncryptionKey ::= SEQUENCE {
typedef struct EncryptionKey {
int keytype;
- octet_string keyvalue;
+ heim_octet_string keyvalue;
} EncryptionKey;
int encode_EncryptionKey(unsigned char *, size_t, const EncryptionKey *, size_t *);
@@ -547,7 +606,7 @@ TransitedEncoding ::= SEQUENCE {
typedef struct TransitedEncoding {
int tr_type;
- octet_string contents;
+ heim_octet_string contents;
} TransitedEncoding;
int encode_TransitedEncoding(unsigned char *, size_t, const TransitedEncoding *, size_t *);
@@ -626,7 +685,7 @@ Checksum ::= SEQUENCE {
typedef struct Checksum {
CKSUMTYPE cksumtype;
- octet_string checksum;
+ heim_octet_string checksum;
} Checksum;
int encode_Checksum(unsigned char *, size_t, const Checksum *, size_t *);
@@ -678,7 +737,7 @@ PA-DATA ::= SEQUENCE {
typedef struct PA_DATA {
PADATA_TYPE padata_type;
- octet_string padata_value;
+ heim_octet_string padata_value;
} PA_DATA;
int encode_PA_DATA(unsigned char *, size_t, const PA_DATA *, size_t *);
@@ -698,7 +757,7 @@ ETYPE-INFO-ENTRY ::= SEQUENCE {
typedef struct ETYPE_INFO_ENTRY {
ENCTYPE etype;
- octet_string *salt;
+ heim_octet_string *salt;
int *salttype;
} ETYPE_INFO_ENTRY;
@@ -726,6 +785,43 @@ int copy_ETYPE_INFO (const ETYPE_INFO *, ETYPE_INFO *);
/*
+ETYPE-INFO2-ENTRY ::= SEQUENCE {
+ etype[0] ENCTYPE,
+ salt[1] KerberosString OPTIONAL,
+ s2kparams[2] OCTET STRING OPTIONAL
+}
+*/
+
+typedef struct ETYPE_INFO2_ENTRY {
+ ENCTYPE etype;
+ KerberosString *salt;
+ heim_octet_string *s2kparams;
+} ETYPE_INFO2_ENTRY;
+
+int encode_ETYPE_INFO2_ENTRY(unsigned char *, size_t, const ETYPE_INFO2_ENTRY *, size_t *);
+int decode_ETYPE_INFO2_ENTRY(const unsigned char *, size_t, ETYPE_INFO2_ENTRY *, size_t *);
+void free_ETYPE_INFO2_ENTRY (ETYPE_INFO2_ENTRY *);
+size_t length_ETYPE_INFO2_ENTRY(const ETYPE_INFO2_ENTRY *);
+int copy_ETYPE_INFO2_ENTRY (const ETYPE_INFO2_ENTRY *, ETYPE_INFO2_ENTRY *);
+
+
+/*
+ETYPE-INFO2 ::= SEQUENCE OF ETYPE-INFO2-ENTRY
+*/
+
+typedef struct ETYPE_INFO2 {
+ unsigned int len;
+ ETYPE_INFO2_ENTRY *val;
+} ETYPE_INFO2;
+
+int encode_ETYPE_INFO2(unsigned char *, size_t, const ETYPE_INFO2 *, size_t *);
+int decode_ETYPE_INFO2(const unsigned char *, size_t, ETYPE_INFO2 *, size_t *);
+void free_ETYPE_INFO2 (ETYPE_INFO2 *);
+size_t length_ETYPE_INFO2(const ETYPE_INFO2 *);
+int copy_ETYPE_INFO2 (const ETYPE_INFO2 *, ETYPE_INFO2 *);
+
+
+/*
METHOD-DATA ::= SEQUENCE OF PA-DATA
*/
@@ -855,6 +951,23 @@ int copy_PA_ENC_TS_ENC (const PA_ENC_TS_ENC *, PA_ENC_TS_ENC *);
/*
+PA-PAC-REQUEST ::= SEQUENCE {
+ include-pac[0] BOOLEAN
+}
+*/
+
+typedef struct PA_PAC_REQUEST {
+ int include_pac;
+} PA_PAC_REQUEST;
+
+int encode_PA_PAC_REQUEST(unsigned char *, size_t, const PA_PAC_REQUEST *, size_t *);
+int decode_PA_PAC_REQUEST(const unsigned char *, size_t, PA_PAC_REQUEST *, size_t *);
+void free_PA_PAC_REQUEST (PA_PAC_REQUEST *);
+size_t length_PA_PAC_REQUEST(const PA_PAC_REQUEST *);
+int copy_PA_PAC_REQUEST (const PA_PAC_REQUEST *, PA_PAC_REQUEST *);
+
+
+/*
KDC-REP ::= SEQUENCE {
pvno[0] INTEGER,
msg-type[1] MESSAGE-TYPE,
@@ -1055,7 +1168,7 @@ KRB-SAFE-BODY ::= SEQUENCE {
*/
typedef struct KRB_SAFE_BODY {
- octet_string user_data;
+ heim_octet_string user_data;
KerberosTime *timestamp;
int *usec;
UNSIGNED *seq_number;
@@ -1126,7 +1239,7 @@ EncKrbPrivPart ::= [APPLICATION 28] SEQUENCE {
*/
typedef struct {
- octet_string user_data;
+ heim_octet_string user_data;
KerberosTime *timestamp;
int *usec;
UNSIGNED *seq_number;
@@ -1264,8 +1377,8 @@ typedef struct {
PrincipalName *cname;
Realm realm;
PrincipalName sname;
- general_string *e_text;
- octet_string *e_data;
+ heim_general_string *e_text;
+ heim_octet_string *e_data;
} KRB_ERROR;
int encode_KRB_ERROR(unsigned char *, size_t, const KRB_ERROR *, size_t *);
@@ -1284,7 +1397,7 @@ ChangePasswdDataMS ::= SEQUENCE {
*/
typedef struct ChangePasswdDataMS {
- octet_string newpasswd;
+ heim_octet_string newpasswd;
PrincipalName *targname;
Realm *targrealm;
} ChangePasswdDataMS;
@@ -1296,8 +1409,282 @@ size_t length_ChangePasswdDataMS(const ChangePasswdDataMS *);
int copy_ChangePasswdDataMS (const ChangePasswdDataMS *, ChangePasswdDataMS *);
+/*
+EtypeList ::= SEQUENCE OF INTEGER
+*/
+
+typedef struct EtypeList {
+ unsigned int len;
+ int *val;
+} EtypeList;
+
+int encode_EtypeList(unsigned char *, size_t, const EtypeList *, size_t *);
+int decode_EtypeList(const unsigned char *, size_t, EtypeList *, size_t *);
+void free_EtypeList (EtypeList *);
+size_t length_EtypeList(const EtypeList *);
+int copy_EtypeList (const EtypeList *, EtypeList *);
+
+
enum { pvno = 5 };
enum { DOMAIN_X500_COMPRESS = 1 };
+/*
+AD-IF-RELEVANT ::= AuthorizationData
+*/
+
+typedef AuthorizationData AD_IF_RELEVANT;
+
+int encode_AD_IF_RELEVANT(unsigned char *, size_t, const AD_IF_RELEVANT *, size_t *);
+int decode_AD_IF_RELEVANT(const unsigned char *, size_t, AD_IF_RELEVANT *, size_t *);
+void free_AD_IF_RELEVANT (AD_IF_RELEVANT *);
+size_t length_AD_IF_RELEVANT(const AD_IF_RELEVANT *);
+int copy_AD_IF_RELEVANT (const AD_IF_RELEVANT *, AD_IF_RELEVANT *);
+
+
+/*
+AD-KDCIssued ::= SEQUENCE {
+ ad-checksum[0] Checksum,
+ i-realm[1] Realm OPTIONAL,
+ i-sname[2] PrincipalName OPTIONAL,
+ elements[3] AuthorizationData
+}
+*/
+
+typedef struct AD_KDCIssued {
+ Checksum ad_checksum;
+ Realm *i_realm;
+ PrincipalName *i_sname;
+ AuthorizationData elements;
+} AD_KDCIssued;
+
+int encode_AD_KDCIssued(unsigned char *, size_t, const AD_KDCIssued *, size_t *);
+int decode_AD_KDCIssued(const unsigned char *, size_t, AD_KDCIssued *, size_t *);
+void free_AD_KDCIssued (AD_KDCIssued *);
+size_t length_AD_KDCIssued(const AD_KDCIssued *);
+int copy_AD_KDCIssued (const AD_KDCIssued *, AD_KDCIssued *);
+
+
+/*
+AD-AND-OR ::= SEQUENCE {
+ condition-count[0] INTEGER,
+ elements[1] AuthorizationData
+}
+*/
+
+typedef struct AD_AND_OR {
+ int condition_count;
+ AuthorizationData elements;
+} AD_AND_OR;
+
+int encode_AD_AND_OR(unsigned char *, size_t, const AD_AND_OR *, size_t *);
+int decode_AD_AND_OR(const unsigned char *, size_t, AD_AND_OR *, size_t *);
+void free_AD_AND_OR (AD_AND_OR *);
+size_t length_AD_AND_OR(const AD_AND_OR *);
+int copy_AD_AND_OR (const AD_AND_OR *, AD_AND_OR *);
+
+
+/*
+AD-MANDATORY-FOR-KDC ::= AuthorizationData
+*/
+
+typedef AuthorizationData AD_MANDATORY_FOR_KDC;
+
+int encode_AD_MANDATORY_FOR_KDC(unsigned char *, size_t, const AD_MANDATORY_FOR_KDC *, size_t *);
+int decode_AD_MANDATORY_FOR_KDC(const unsigned char *, size_t, AD_MANDATORY_FOR_KDC *, size_t *);
+void free_AD_MANDATORY_FOR_KDC (AD_MANDATORY_FOR_KDC *);
+size_t length_AD_MANDATORY_FOR_KDC(const AD_MANDATORY_FOR_KDC *);
+int copy_AD_MANDATORY_FOR_KDC (const AD_MANDATORY_FOR_KDC *, AD_MANDATORY_FOR_KDC *);
+
+
+/*
+PA-SAM-TYPE ::= INTEGER
+*/
+
+typedef enum PA_SAM_TYPE {
+ PA_SAM_TYPE_ENIGMA = 1,
+ PA_SAM_TYPE_DIGI_PATH = 2,
+ PA_SAM_TYPE_SKEY_K0 = 3,
+ PA_SAM_TYPE_SKEY = 4,
+ PA_SAM_TYPE_SECURID = 5,
+ PA_SAM_TYPE_CRYPTOCARD = 6
+} PA_SAM_TYPE;
+
+int encode_PA_SAM_TYPE(unsigned char *, size_t, const PA_SAM_TYPE *, size_t *);
+int decode_PA_SAM_TYPE(const unsigned char *, size_t, PA_SAM_TYPE *, size_t *);
+void free_PA_SAM_TYPE (PA_SAM_TYPE *);
+size_t length_PA_SAM_TYPE(const PA_SAM_TYPE *);
+int copy_PA_SAM_TYPE (const PA_SAM_TYPE *, PA_SAM_TYPE *);
+
+
+/*
+PA-SAM-REDIRECT ::= HostAddresses
+*/
+
+typedef HostAddresses PA_SAM_REDIRECT;
+
+int encode_PA_SAM_REDIRECT(unsigned char *, size_t, const PA_SAM_REDIRECT *, size_t *);
+int decode_PA_SAM_REDIRECT(const unsigned char *, size_t, PA_SAM_REDIRECT *, size_t *);
+void free_PA_SAM_REDIRECT (PA_SAM_REDIRECT *);
+size_t length_PA_SAM_REDIRECT(const PA_SAM_REDIRECT *);
+int copy_PA_SAM_REDIRECT (const PA_SAM_REDIRECT *, PA_SAM_REDIRECT *);
+
+
+/*
+SAMFlags ::= BIT STRING {
+ use-sad-as-key(0),
+ send-encrypted-sad(1),
+ must-pk-encrypt-sad(2)
+}
+*/
+
+typedef struct SAMFlags {
+ unsigned int use_sad_as_key:1;
+ unsigned int send_encrypted_sad:1;
+ unsigned int must_pk_encrypt_sad:1;
+} SAMFlags;
+
+
+int encode_SAMFlags(unsigned char *, size_t, const SAMFlags *, size_t *);
+int decode_SAMFlags(const unsigned char *, size_t, SAMFlags *, size_t *);
+void free_SAMFlags (SAMFlags *);
+size_t length_SAMFlags(const SAMFlags *);
+int copy_SAMFlags (const SAMFlags *, SAMFlags *);
+unsigned SAMFlags2int(SAMFlags);
+SAMFlags int2SAMFlags(unsigned);
+const struct units * asn1_SAMFlags_units(void);
+
+/*
+PA-SAM-CHALLENGE-2-BODY ::= SEQUENCE {
+ sam-type[0] INTEGER,
+ sam-flags[1] SAMFlags,
+ sam-type-name[2] GeneralString OPTIONAL,
+ sam-track-id[3] GeneralString OPTIONAL,
+ sam-challenge-label[4] GeneralString OPTIONAL,
+ sam-challenge[5] GeneralString OPTIONAL,
+ sam-response-prompt[6] GeneralString OPTIONAL,
+ sam-pk-for-sad[7] EncryptionKey OPTIONAL,
+ sam-nonce[8] INTEGER,
+ sam-etype[9] INTEGER
+}
+*/
+
+typedef struct PA_SAM_CHALLENGE_2_BODY {
+ int sam_type;
+ SAMFlags sam_flags;
+ heim_general_string *sam_type_name;
+ heim_general_string *sam_track_id;
+ heim_general_string *sam_challenge_label;
+ heim_general_string *sam_challenge;
+ heim_general_string *sam_response_prompt;
+ EncryptionKey *sam_pk_for_sad;
+ int sam_nonce;
+ int sam_etype;
+} PA_SAM_CHALLENGE_2_BODY;
+
+int encode_PA_SAM_CHALLENGE_2_BODY(unsigned char *, size_t, const PA_SAM_CHALLENGE_2_BODY *, size_t *);
+int decode_PA_SAM_CHALLENGE_2_BODY(const unsigned char *, size_t, PA_SAM_CHALLENGE_2_BODY *, size_t *);
+void free_PA_SAM_CHALLENGE_2_BODY (PA_SAM_CHALLENGE_2_BODY *);
+size_t length_PA_SAM_CHALLENGE_2_BODY(const PA_SAM_CHALLENGE_2_BODY *);
+int copy_PA_SAM_CHALLENGE_2_BODY (const PA_SAM_CHALLENGE_2_BODY *, PA_SAM_CHALLENGE_2_BODY *);
+
+
+/*
+PA-SAM-CHALLENGE-2 ::= SEQUENCE {
+ sam-body[0] PA-SAM-CHALLENGE-2-BODY,
+ sam-cksum[1] SEQUENCE OF Checksum
+}
+*/
+
+typedef struct PA_SAM_CHALLENGE_2 {
+ PA_SAM_CHALLENGE_2_BODY sam_body;
+ struct {
+ unsigned int len;
+ Checksum *val;
+ } sam_cksum;
+} PA_SAM_CHALLENGE_2;
+
+int encode_PA_SAM_CHALLENGE_2(unsigned char *, size_t, const PA_SAM_CHALLENGE_2 *, size_t *);
+int decode_PA_SAM_CHALLENGE_2(const unsigned char *, size_t, PA_SAM_CHALLENGE_2 *, size_t *);
+void free_PA_SAM_CHALLENGE_2 (PA_SAM_CHALLENGE_2 *);
+size_t length_PA_SAM_CHALLENGE_2(const PA_SAM_CHALLENGE_2 *);
+int copy_PA_SAM_CHALLENGE_2 (const PA_SAM_CHALLENGE_2 *, PA_SAM_CHALLENGE_2 *);
+
+
+/*
+PA-SAM-RESPONSE-2 ::= SEQUENCE {
+ sam-type[0] INTEGER,
+ sam-flags[1] SAMFlags,
+ sam-track-id[2] GeneralString OPTIONAL,
+ sam-enc-nonce-or-sad[3] EncryptedData,
+ sam-nonce[4] INTEGER
+}
+*/
+
+typedef struct PA_SAM_RESPONSE_2 {
+ int sam_type;
+ SAMFlags sam_flags;
+ heim_general_string *sam_track_id;
+ EncryptedData sam_enc_nonce_or_sad;
+ int sam_nonce;
+} PA_SAM_RESPONSE_2;
+
+int encode_PA_SAM_RESPONSE_2(unsigned char *, size_t, const PA_SAM_RESPONSE_2 *, size_t *);
+int decode_PA_SAM_RESPONSE_2(const unsigned char *, size_t, PA_SAM_RESPONSE_2 *, size_t *);
+void free_PA_SAM_RESPONSE_2 (PA_SAM_RESPONSE_2 *);
+size_t length_PA_SAM_RESPONSE_2(const PA_SAM_RESPONSE_2 *);
+int copy_PA_SAM_RESPONSE_2 (const PA_SAM_RESPONSE_2 *, PA_SAM_RESPONSE_2 *);
+
+
+/*
+PA-ENC-SAM-RESPONSE-ENC ::= SEQUENCE {
+ sam-nonce[0] INTEGER,
+ sam-sad[1] GeneralString OPTIONAL
+}
+*/
+
+typedef struct PA_ENC_SAM_RESPONSE_ENC {
+ int sam_nonce;
+ heim_general_string *sam_sad;
+} PA_ENC_SAM_RESPONSE_ENC;
+
+int encode_PA_ENC_SAM_RESPONSE_ENC(unsigned char *, size_t, const PA_ENC_SAM_RESPONSE_ENC *, size_t *);
+int decode_PA_ENC_SAM_RESPONSE_ENC(const unsigned char *, size_t, PA_ENC_SAM_RESPONSE_ENC *, size_t *);
+void free_PA_ENC_SAM_RESPONSE_ENC (PA_ENC_SAM_RESPONSE_ENC *);
+size_t length_PA_ENC_SAM_RESPONSE_ENC(const PA_ENC_SAM_RESPONSE_ENC *);
+int copy_PA_ENC_SAM_RESPONSE_ENC (const PA_ENC_SAM_RESPONSE_ENC *, PA_ENC_SAM_RESPONSE_ENC *);
+
+
+/*
+RC2CBCParameter ::= SEQUENCE {
+ rc2ParameterVersion[0] INTEGER,
+ iv[1] OCTET STRING
+}
+*/
+
+typedef struct RC2CBCParameter {
+ int rc2ParameterVersion;
+ heim_octet_string iv;
+} RC2CBCParameter;
+
+int encode_RC2CBCParameter(unsigned char *, size_t, const RC2CBCParameter *, size_t *);
+int decode_RC2CBCParameter(const unsigned char *, size_t, RC2CBCParameter *, size_t *);
+void free_RC2CBCParameter (RC2CBCParameter *);
+size_t length_RC2CBCParameter(const RC2CBCParameter *);
+int copy_RC2CBCParameter (const RC2CBCParameter *, RC2CBCParameter *);
+
+
+/*
+CBCParameter ::= OCTET STRING
+*/
+
+typedef heim_octet_string CBCParameter;
+
+int encode_CBCParameter(unsigned char *, size_t, const CBCParameter *, size_t *);
+int decode_CBCParameter(const unsigned char *, size_t, CBCParameter *, size_t *);
+void free_CBCParameter (CBCParameter *);
+size_t length_CBCParameter(const CBCParameter *);
+int copy_CBCParameter (const CBCParameter *, CBCParameter *);
+
+
#endif /* __krb5_asn1_h__ */
diff --git a/lib/libkrb5/generated/krb5_err.c b/lib/libkrb5/generated/krb5_err.c
index 1a81d394302..b59d8706bb5 100644
--- a/lib/libkrb5/generated/krb5_err.c
+++ b/lib/libkrb5/generated/krb5_err.c
@@ -1,11 +1,11 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/krb5_err.et */
-/* $KTH: krb5_err.et,v 1.9 2000/04/06 00:41:37 assar Exp $ */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/krb5_err.et */
+/* $KTH: krb5_err.et,v 1.12 2004/10/14 15:30:29 lha Exp $ */
#include <stddef.h>
#include <com_err.h>
#include "krb5_err.h"
-static const char *text[] = {
+static const char *krb5_error_strings[] = {
/* 000 */ "No error",
/* 001 */ "Client's entry in database has expired",
/* 002 */ "Server's entry in database has expired",
@@ -71,23 +71,23 @@ static const char *text[] = {
/* 062 */ "Client not trusted",
/* 063 */ "KDC not trusted",
/* 064 */ "Invalid signature",
- /* 065 */ "Key too weak",
+ /* 065 */ "Key size too small/key too weak",
/* 066 */ "Certificate mismatch",
/* 067 */ "User to user required",
- /* 068 */ "Cannot verify certificate",
- /* 069 */ "Invalid certificate",
- /* 070 */ "Revoked certificate",
- /* 071 */ "Revocation status unknown",
- /* 072 */ "Revocation status unavailable",
- /* 073 */ "Client name mismatch",
- /* 074 */ "KDC name mismatch",
- /* 075 */ "Reserved krb5 error (75)",
- /* 076 */ "Reserved krb5 error (76)",
+ /* 068 */ "Reserved krb5 error (68)",
+ /* 069 */ "Reserved krb5 error (69)",
+ /* 070 */ "Cannot verify certificate",
+ /* 071 */ "Invalid certificate",
+ /* 072 */ "Revoked certificate",
+ /* 073 */ "Revocation status unknown",
+ /* 074 */ "Revocation status unknown",
+ /* 075 */ "Client name mismatch",
+ /* 075 */ "KDC name mismatch",
/* 077 */ "Reserved krb5 error (77)",
/* 078 */ "Reserved krb5 error (78)",
/* 079 */ "Reserved krb5 error (79)",
- /* 080 */ "Reserved krb5 error (80)",
- /* 081 */ "Reserved krb5 error (81)",
+ /* 080 */ "IAKERB proxy could not find a KDC",
+ /* 081 */ "IAKERB proxy never reeived a response from a KDC",
/* 082 */ "Reserved krb5 error (82)",
/* 083 */ "Reserved krb5 error (83)",
/* 084 */ "Reserved krb5 error (84)",
@@ -134,7 +134,7 @@ static const char *text[] = {
/* 125 */ "Reserved krb5 error (125)",
/* 126 */ "Reserved krb5 error (126)",
/* 127 */ "Reserved krb5 error (127)",
- /* 128 */ "$KTH: krb5_err.et,v 1.9 2000/04/06 00:41:37 assar Exp $",
+ /* 128 */ "$KTH: krb5_err.et,v 1.12 2004/10/14 15:30:29 lha Exp $",
/* 129 */ "Invalid flag for file lock mode",
/* 130 */ "Cannot read password",
/* 131 */ "Password mismatch",
@@ -206,41 +206,66 @@ static const char *text[] = {
/* 197 */ "Error writing to credentials cache file",
/* 198 */ "No more memory to allocate (in credentials cache code)",
/* 199 */ "Bad format in credentials cache",
- /* 200 */ "Invalid KDC option combination (library internal error)",
- /* 201 */ "Request missing second ticket",
- /* 202 */ "No credentials supplied to library routine",
- /* 203 */ "Bad sendauth version was sent",
- /* 204 */ "Bad application version was sent (via sendauth)",
- /* 205 */ "Bad response (during sendauth exchange)",
- /* 206 */ "Server rejected authentication (during sendauth exchange)",
- /* 207 */ "Unsupported preauthentication type",
- /* 208 */ "Required preauthentication key not supplied",
- /* 209 */ "Generic preauthentication failure",
- /* 210 */ "Unsupported replay cache format version number",
- /* 211 */ "Unsupported credentials cache format version number",
- /* 212 */ "Unsupported key table format version number",
- /* 213 */ "Program lacks support for address type",
- /* 214 */ "Message replay detection requires rcache parameter",
- /* 215 */ "Hostname cannot be canonicalized",
- /* 216 */ "Cannot determine realm for host",
- /* 217 */ "Conversion to service principal undefined for name type",
- /* 218 */ "Initial Ticket response appears to be Version 4",
- /* 219 */ "Cannot resolve KDC for requested realm",
- /* 220 */ "Requesting ticket can't get forwardable tickets",
- /* 221 */ "Bad principal name while trying to forward credentials",
- /* 222 */ "Looping detected inside krb5_get_in_tkt",
- /* 223 */ "Configuration file does not specify default realm",
- /* 224 */ "Bad SAM flags in obtain_sam_padata",
- /* 225 */ "Keytab name too long",
+ /* 200 */ "No credentials found with supported encryption types",
+ /* 201 */ "Invalid KDC option combination (library internal error)",
+ /* 202 */ "Request missing second ticket",
+ /* 203 */ "No credentials supplied to library routine",
+ /* 204 */ "Bad sendauth version was sent",
+ /* 205 */ "Bad application version was sent (via sendauth)",
+ /* 206 */ "Bad response (during sendauth exchange)",
+ /* 207 */ "Server rejected authentication (during sendauth exchange)",
+ /* 208 */ "Unsupported preauthentication type",
+ /* 209 */ "Required preauthentication key not supplied",
+ /* 210 */ "Generic preauthentication failure",
+ /* 211 */ "Unsupported replay cache format version number",
+ /* 212 */ "Unsupported credentials cache format version number",
+ /* 213 */ "Unsupported key table format version number",
+ /* 214 */ "Program lacks support for address type",
+ /* 215 */ "Message replay detection requires rcache parameter",
+ /* 216 */ "Hostname cannot be canonicalized",
+ /* 217 */ "Cannot determine realm for host",
+ /* 218 */ "Conversion to service principal undefined for name type",
+ /* 219 */ "Initial Ticket response appears to be Version 4",
+ /* 220 */ "Cannot resolve KDC for requested realm",
+ /* 221 */ "Requesting ticket can't get forwardable tickets",
+ /* 222 */ "Bad principal name while trying to forward credentials",
+ /* 223 */ "Looping detected inside krb5_get_in_tkt",
+ /* 224 */ "Configuration file does not specify default realm",
+ /* 225 */ "Bad SAM flags in obtain_sam_padata",
+ /* 226 */ "Invalid encryption type in SAM challenge",
+ /* 227 */ "Missing checksum in SAM challenge",
+ /* 228 */ "Bad checksum in SAM challenge",
+ /* 229 */ "Reserved krb5 error (229)",
+ /* 230 */ "Reserved krb5 error (230)",
+ /* 231 */ "Reserved krb5 error (231)",
+ /* 232 */ "Reserved krb5 error (232)",
+ /* 233 */ "Reserved krb5 error (233)",
+ /* 234 */ "Reserved krb5 error (234)",
+ /* 235 */ "Reserved krb5 error (235)",
+ /* 236 */ "Reserved krb5 error (236)",
+ /* 237 */ "Reserved krb5 error (237)",
+ /* 238 */ "Program called an obsolete, deleted function",
+ /* 239 */ "Reserved krb5 error (239)",
+ /* 240 */ "Reserved krb5 error (240)",
+ /* 241 */ "Reserved krb5 error (241)",
+ /* 242 */ "Reserved krb5 error (242)",
+ /* 243 */ "Reserved krb5 error (243)",
+ /* 244 */ "Reserved krb5 error (244)",
+ /* 245 */ "Invalid key generation parameters from KDC",
+ /* 246 */ "Service not available",
+ /* 247 */ "Credential cache function not supported",
+ /* 248 */ "Invalid format of Kerberos lifetime or clock skew string",
NULL
};
+#define num_errors 249
+
void initialize_krb5_error_table_r(struct et_list **list)
{
- initialize_error_table_r(list, text, krb5_num_errors, ERROR_TABLE_BASE_krb5);
+ initialize_error_table_r(list, krb5_error_strings, num_errors, ERROR_TABLE_BASE_krb5);
}
void initialize_krb5_error_table(void)
{
- init_error_table(text, ERROR_TABLE_BASE_krb5, krb5_num_errors);
+ init_error_table(krb5_error_strings, ERROR_TABLE_BASE_krb5, num_errors);
}
diff --git a/lib/libkrb5/generated/krb5_err.h b/lib/libkrb5/generated/krb5_err.h
index 580fbef1398..3d04d56b4a6 100644
--- a/lib/libkrb5/generated/krb5_err.h
+++ b/lib/libkrb5/generated/krb5_err.h
@@ -1,10 +1,10 @@
-/* Generated from /usr/src/lib/libkrb5/../../kerberosV/src/lib/krb5/krb5_err.et */
-/* $KTH: krb5_err.et,v 1.9 2000/04/06 00:41:37 assar Exp $ */
+/* Generated from /home/biorn/src/lib/libkrb5/../../kerberosV/src/lib/krb5/krb5_err.et */
+/* $KTH: krb5_err.et,v 1.12 2004/10/14 15:30:29 lha Exp $ */
#ifndef __krb5_err_h__
#define __krb5_err_h__
-#include <com_err.h>
+struct et_list;
void initialize_krb5_error_table_r(struct et_list **);
@@ -12,8 +12,6 @@ void initialize_krb5_error_table(void);
#define init_krb5_err_tbl initialize_krb5_error_table
typedef enum krb5_error_number{
- ERROR_TABLE_BASE_krb5 = -1765328384,
- krb5_err_base = -1765328384,
KRB5KDC_ERR_NONE = -1765328384,
KRB5KDC_ERR_NAME_EXP = -1765328383,
KRB5KDC_ERR_SERVICE_EXP = -1765328382,
@@ -65,19 +63,21 @@ typedef enum krb5_error_number{
KRB5KRB_ERR_RESPONSE_TOO_BIG = -1765328332,
KRB5KRB_ERR_GENERIC = -1765328324,
KRB5KRB_ERR_FIELD_TOOLONG = -1765328323,
- KDC_ERROR_CLIENT_NOT_TRUSTED = -1765328322,
- KDC_ERROR_KDC_NOT_TRUSTED = -1765328321,
- KDC_ERROR_INVALID_SIG = -1765328320,
- KDC_ERROR_KEY_TOO_WEAK = -1765328319,
- KDC_ERROR_CERTIFICATE_MISMATCH = -1765328318,
+ KRB5_KDC_ERR_CLIENT_NOT_TRUSTED = -1765328322,
+ KRB5_KDC_ERR_KDC_NOT_TRUSTED = -1765328321,
+ KRB5_KDC_ERR_INVALID_SIG = -1765328320,
+ KRB5_KDC_ERR_KEY_SIZE = -1765328319,
+ KRB5_KDC_ERR_CERTIFICATE_MISMATCH = -1765328318,
KRB5_AP_ERR_USER_TO_USER_REQUIRED = -1765328317,
- KDC_ERROR_CANT_VERIFY_CERTIFICATE = -1765328316,
- KDC_ERROR_INVALID_CERTIFICATE = -1765328315,
- KDC_ERROR_REVOKED_CERTIFICATE = -1765328314,
- KDC_ERROR_REVOCATION_STATUS_UNKNOWN = -1765328313,
- KDC_ERROR_REVOCATION_STATUS_UNAVAILABLE = -1765328312,
- KDC_ERROR_CLIENT_NAME_MISMATCH = -1765328311,
- KDC_ERROR_KDC_NAME_MISMATCH = -1765328310,
+ KRB5_KDC_ERROR_CANT_VERIFY_CERTIFICATE = -1765328314,
+ KRB5_KDC_ERROR_INVALID_CERTIFICATE = -1765328313,
+ KRB5_KDC_ERROR_REVOKED_CERTIFICATE = -1765328312,
+ KRB5_KDC_ERROR_REVOCATION_STATUS_UNKNOWN = -1765328311,
+ KRB5_KDC_ERROR_REVOCATION_STATUS_UNAVAILABLE = -1765328310,
+ KRB5_KDC_ERROR_CLIENT_NAME_MISMATCH = -1765328309,
+ KRB5_KDC_ERROR_KDC_NAME_MISMATCH = -1765328309,
+ KRB5_IAKERB_ERR_KDC_NOT_FOUND = -1765328304,
+ KRB5_IAKERB_ERR_KDC_NO_RESPONSE = -1765328303,
KRB5_ERR_RCSID = -1765328256,
KRB5_LIBOS_BADLOCKFLAG = -1765328255,
KRB5_LIBOS_CANTREADPWD = -1765328254,
@@ -150,33 +150,42 @@ typedef enum krb5_error_number{
KRB5_CC_WRITE = -1765328187,
KRB5_CC_NOMEM = -1765328186,
KRB5_CC_FORMAT = -1765328185,
- KRB5_INVALID_FLAGS = -1765328184,
- KRB5_NO_2ND_TKT = -1765328183,
- KRB5_NOCREDS_SUPPLIED = -1765328182,
- KRB5_SENDAUTH_BADAUTHVERS = -1765328181,
- KRB5_SENDAUTH_BADAPPLVERS = -1765328180,
- KRB5_SENDAUTH_BADRESPONSE = -1765328179,
- KRB5_SENDAUTH_REJECTED = -1765328178,
- KRB5_PREAUTH_BAD_TYPE = -1765328177,
- KRB5_PREAUTH_NO_KEY = -1765328176,
- KRB5_PREAUTH_FAILED = -1765328175,
- KRB5_RCACHE_BADVNO = -1765328174,
- KRB5_CCACHE_BADVNO = -1765328173,
- KRB5_KEYTAB_BADVNO = -1765328172,
- KRB5_PROG_ATYPE_NOSUPP = -1765328171,
- KRB5_RC_REQUIRED = -1765328170,
- KRB5_ERR_BAD_HOSTNAME = -1765328169,
- KRB5_ERR_HOST_REALM_UNKNOWN = -1765328168,
- KRB5_SNAME_UNSUPP_NAMETYPE = -1765328167,
- KRB5KRB_AP_ERR_V4_REPLY = -1765328166,
- KRB5_REALM_CANT_RESOLVE = -1765328165,
- KRB5_TKT_NOT_FORWARDABLE = -1765328164,
- KRB5_FWD_BAD_PRINCIPAL = -1765328163,
- KRB5_GET_IN_TKT_LOOP = -1765328162,
- KRB5_CONFIG_NODEFREALM = -1765328161,
- KRB5_SAM_UNSUPPORTED = -1765328160,
- KRB5_KT_NAME_TOOLONG = -1765328159,
- krb5_num_errors = 226
+ KRB5_CC_NOT_KTYPE = -1765328184,
+ KRB5_INVALID_FLAGS = -1765328183,
+ KRB5_NO_2ND_TKT = -1765328182,
+ KRB5_NOCREDS_SUPPLIED = -1765328181,
+ KRB5_SENDAUTH_BADAUTHVERS = -1765328180,
+ KRB5_SENDAUTH_BADAPPLVERS = -1765328179,
+ KRB5_SENDAUTH_BADRESPONSE = -1765328178,
+ KRB5_SENDAUTH_REJECTED = -1765328177,
+ KRB5_PREAUTH_BAD_TYPE = -1765328176,
+ KRB5_PREAUTH_NO_KEY = -1765328175,
+ KRB5_PREAUTH_FAILED = -1765328174,
+ KRB5_RCACHE_BADVNO = -1765328173,
+ KRB5_CCACHE_BADVNO = -1765328172,
+ KRB5_KEYTAB_BADVNO = -1765328171,
+ KRB5_PROG_ATYPE_NOSUPP = -1765328170,
+ KRB5_RC_REQUIRED = -1765328169,
+ KRB5_ERR_BAD_HOSTNAME = -1765328168,
+ KRB5_ERR_HOST_REALM_UNKNOWN = -1765328167,
+ KRB5_SNAME_UNSUPP_NAMETYPE = -1765328166,
+ KRB5KRB_AP_ERR_V4_REPLY = -1765328165,
+ KRB5_REALM_CANT_RESOLVE = -1765328164,
+ KRB5_TKT_NOT_FORWARDABLE = -1765328163,
+ KRB5_FWD_BAD_PRINCIPAL = -1765328162,
+ KRB5_GET_IN_TKT_LOOP = -1765328161,
+ KRB5_CONFIG_NODEFREALM = -1765328160,
+ KRB5_SAM_UNSUPPORTED = -1765328159,
+ KRB5_SAM_INVALID_ETYPE = -1765328158,
+ KRB5_SAM_NO_CHECKSUM = -1765328157,
+ KRB5_SAM_BAD_CHECKSUM = -1765328156,
+ KRB5_OBSOLETE_FN = -1765328146,
+ KRB5_ERR_BAD_S2K_PARAMS = -1765328139,
+ KRB5_ERR_NO_SERVICE = -1765328138,
+ KRB5_CC_NOSUPP = -1765328137,
+ KRB5_DELTAT_BADFORMAT = -1765328136
} krb5_error_number;
+#define ERROR_TABLE_BASE_krb5 -1765328384
+
#endif /* __krb5_err_h__ */