summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/asn.1
Commit message (Collapse)AuthorAgeFilesLines
...
* Added parenthesis to fix precedence problem in ASN.1 backwards compatibilityTheodore Tso1995-04-211-1/+1
| | | | | | code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5422 dc483132-0cff-0310-8789-dd5450dbe970
* Move the define of BACKWARDS_BITMASK_COMPAT to asn1_k_decode.c, sinceTheodore Tso1995-04-203-8/+14
| | | | | | it doesn't #include krbasn1. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5409 dc483132-0cff-0310-8789-dd5450dbe970
* asn1_k_decode.c (asn1_decode_krb5_flags): Make the functionTheodore Tso1995-04-194-6/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | accept bit strings which are less 32 bits long. (RFC-1510 makes no guarantee that the length of the bit string must be 32 bits long; the old code required that the length of the bit string must be exactly 32 bits.) Flip the bits with respect to a 32-bit boundary, since that's what the old ASN.1 glue code did. (The values in fieldbits.h are encoded backwards, for no good reason.) If BACKWARDS_BITMASK_COMPAT is defined, then only flip the bits if the high 16 bits are clear and there are some bits set in the low 16 bits. This preserves interoperabilty with the old beta 4 distribution, which sent the bit string without flipping them around. asn1_k_encode.c (asn1_encode_krb5_flags): Flip the bits with respect to a 32-bit boundary, since that's what the old ASN.1 glue code did. (The values in fieldbits.h are encoded backwards, for no good reason.) krb_asn1.h: #define BACKWARDS_BITMASK_COMPAT. Add extern declaration for asn1_swbits, which is needed for the bit reversing code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5380 dc483132-0cff-0310-8789-dd5450dbe970
* Add Cygnus's "Sanitize" system to the krb5 tree, to make it easier to doTheodore Tso1995-04-141-0/+60
| | | | | | releases.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5359 dc483132-0cff-0310-8789-dd5450dbe970
* Removed 'unreferenced local variable' problemKeith Vetter1995-04-142-1/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5355 dc483132-0cff-0310-8789-dd5450dbe970
* Windows global stuff:Keith Vetter1995-04-1419-286/+289
| | | | | | | | | o removed INTERFACE from non-api functions o add FAR to pointers visible to the world o made the tests for __STDC__ also check for _WINDOWS o creates GSSAPI.DLL & GSSAPI.LIB as per spec. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5354 dc483132-0cff-0310-8789-dd5450dbe970
* asn1_k_decode.c (setup, next_tag, apptag, get_field_body,Theodore Tso1995-04-135-13/+64
| | | | | | | | | | | | | | | | | | | | | | get_lenfield_body, asn1_decode_ticket): Use the taglength to determine whether or not the indefinite encoding was used, and if so skip over the termination flag bytes in the ASN.1 stream. asn1buf.c (asn1buf_imbed, asn1buf_remains): Make changes to allow for indefinite encodings. asn1buf_remains() is now only used for decoding structures and arrays (i.e., asn.1 constructs which terminate indefinite encodings with two zero octets. [ Note these fixes to support indefinite encoding aren't terribly clean; some invalid encodings may be accepted when they should not be. This should be looked at in more detail later.] asn1_get.c (asn1_get_tag): Inline original asn1buf_remains() code, since asn1_get_tag doesn't use asn1buf_remains in the context of a structure or an array. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5353 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_decode.c: move declaration of gmt_mktime() outside ofTom Yu1995-03-252-1/+8
| | | | | | | asn1_decode_generaltime() so that compilers like Ultrix cc that don't support prototypes within function bodies don't break git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5246 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in: Remove redundant definitions from config/pre.inJohn Gilmore1995-03-185-24/+16
| | | | | | | | | | | (clean-mac): Add. * asn1_misc.c: Avoid <malloc.h> and <memory.h> includes, for Mac. (asn1_krb5_realm_copy): Use malloc, not calloc, since we're about to clobber the storage anyway. * configure.in (WITH_KRB5ROOT): Remove, not needed. * krbasn1.h: Document that <limits.h> is needed for INT_MAX. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5154 dc483132-0cff-0310-8789-dd5450dbe970
* Make the second argument of asn1buf_insert_octet be an int, instead ofTheodore Tso1995-03-103-2/+8
| | | | | | | | asn1_octet. ANSI C narrow types screws us again.... (The RS/6000 compiler blew out until this was fixed....) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5107 dc483132-0cff-0310-8789-dd5450dbe970
* Changed krb5 library name on the PC since the DLL will take that name insteadKeith Vetter1995-03-082-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5088 dc483132-0cff-0310-8789-dd5450dbe970
* Several small 16 vs 32 bit castsKeith Vetter1995-03-026-4/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5056 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid <krb5/....> includesJohn Gilmore1995-02-2813-13/+18
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5007 dc483132-0cff-0310-8789-dd5450dbe970
* Converted krb5/des425 and krb5/asn.1 to the PCKeith Vetter1995-02-2220-310/+322
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4970 dc483132-0cff-0310-8789-dd5450dbe970
* Added missing declarations, removed duplicate onesTheodore Tso1995-02-223-9/+21
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4969 dc483132-0cff-0310-8789-dd5450dbe970
* Removed ISODE cruftTheodore Tso1995-02-1012-728/+69
| | | | | | krb5_encode.h and krb5_decode.h have been poured into include/krb5/asn1.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4938 dc483132-0cff-0310-8789-dd5450dbe970
* Add .cvsignore file so that cvs ignores the autoconf-built configure fileTheodore Tso1995-02-031-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4904 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_decode_k.c => asn1_k_decode.cJohn Gilmore1995-02-038-13/+22
| | | | | | | | | | * asn1_decode_k.h => asn1_k_decode.h * asn1_encode_k.c => asn1_k_encode.c * asn1_encode_k.h => asn1_k_encode.h * Makefile.sane.in, krb5_decode.c, krb5_encode.c, asn1_k_encode.c, asn1_k_decode.c: updated to match. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4885 dc483132-0cff-0310-8789-dd5450dbe970
* Removal of ISODE (and there was much rejoicing)Theodore Tso1995-02-0260-5960/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4876 dc483132-0cff-0310-8789-dd5450dbe970
* Removed all references to DECLARG and OLDDECLARGChris Provenzano1995-01-1311-785/+553
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4809 dc483132-0cff-0310-8789-dd5450dbe970
* Add magic number to keyblock structureTheodore Tso1994-11-192-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4702 dc483132-0cff-0310-8789-dd5450dbe970
* asn1_decode_k.c (asn1_decode_principal_name,Theodore Tso1994-11-172-0/+33
| | | | | | | | | | | | | | | | | asn1_decode_checksum, asn1_decode_encrypted_data, asn1_decode_transited_encoding, asn1_decode_enc_kdc_rep_part, asn1_decode_ticket, asn1_decode_kdc_req, asn1_decode_kdc_req_body, asn1_decode_safe_body, asn1_decode_host_address, asn1_decode_kdc_rep, asn1_decode_authdata_elt, asn1_decode_krb_cred_info, asn1_decode_pa_data, asn1_decode_last_req_entry): Initialize magic number field in the relevant structures. asn1_decode_k.c (asn1_decode_encryption_key): Add appropriate magic number and encryption type. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4672 dc483132-0cff-0310-8789-dd5450dbe970
* Add WITH_CPPOPTS since we're not using CONFIG_RULES (yet)Theodore Tso1994-11-032-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4622 dc483132-0cff-0310-8789-dd5450dbe970
* Remove duplicate definitions for DEFs, CC, CCOPTS and LIBSTheodore Tso1994-10-282-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4595 dc483132-0cff-0310-8789-dd5450dbe970
* Conversion of autoconfigury to Autoconf V2Mark Eichin1994-10-261-2/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4576 dc483132-0cff-0310-8789-dd5450dbe970
* asn1_decode_k.c (asn1_decode_kdc_req_body): If the authorization fieldTheodore Tso1994-10-197-17/+66
| | | | | | | | | | | | | | | | | | is not present, fill in the authorization data fields with all zeros. Don't set kvno (that's *key* version number, not *Kerberos* version number) to 5. err2kerr.c (KRB5_KRB__ERROR2krb5_error): The e_data field wasn't being decoded when it should have been. qbuf2data.c (qbuf2krb5_data): Set magic number field to zero. tgrq2ktgrq.c (KRB5_KDC__REQ__BODY2krb5_kdc_req): Allow the service principal to be optional. ktgrq2tgrq.c (krb5_kdc_req2KRB5_KDC__REQ__BODY): ditto git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4536 dc483132-0cff-0310-8789-dd5450dbe970
* Add -DKRB5_USE_ISODE so that include files get included properlyTheodore Tso1994-10-072-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4485 dc483132-0cff-0310-8789-dd5450dbe970
* Don't assume that krb5_timestamp and time_t are the same typeTheodore Tso1994-10-042-1/+14
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4450 dc483132-0cff-0310-8789-dd5450dbe970
* Always fill in a NULL for a zero-length char string or octet string inTheodore Tso1994-09-292-3/+20
| | | | | | | asn1_remove_charstring or asn1_remove_octetstring. This means we do the same thing no matter whether the system returns NULL for malloc(0) or not. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4376 dc483132-0cff-0310-8789-dd5450dbe970
* = should have been == in commented out codeTheodore Tso1994-09-282-2/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4359 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leak in decode timestamp returnTheodore Tso1994-09-213-1/+15
| | | | | | Initialize return variable in decode_krb5_authdata() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4327 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-1861-363/+61
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4191 dc483132-0cff-0310-8789-dd5450dbe970
* 1) Stop checking the msg_type field unless KRB5_MSGTYPE_STRICT is definedTheodore Tso1994-08-175-55/+86
| | | | | | | | | 2) Allow the enc_kdc_rep_part structure to have a ASN.1 tag of either 25 (AS REP) or 26 (TGS REP). Unfortunately, old versions of Kerberos always use TGS REP (#26), so we can't change the encoder with breaking compatibility. Sigh.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4175 dc483132-0cff-0310-8789-dd5450dbe970
* fix time includesMark Eichin1994-08-171-2/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4166 dc483132-0cff-0310-8789-dd5450dbe970
* stdlib.hMark Eichin1994-08-142-1/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4145 dc483132-0cff-0310-8789-dd5450dbe970
* Changes to prevent krb5_encode.c from writing to constant structures.Theodore Tso1994-08-114-62/+36
| | | | | | Internals of ASN.1 code cleaned up a bit in the process.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4121 dc483132-0cff-0310-8789-dd5450dbe970
* Stamp Out Imake in Our Lifetimes..Mark Eichin1994-08-091-80/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4085 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_decode_k.c (asn1_decode_sequence_of_enctype): fix typoTom Yu1994-08-042-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4045 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_decode_k.c (asn1_decode_sequence_of_enctype): more fixingTom Yu1994-08-022-1/+9
| | | | | | of realloc(NULL) returning NULL git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4032 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1buf.h: include ext-proto.h now to avoid type warningsTom Yu1994-07-232-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4010 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode_k.c (asn1_encode_transited_encoding): whoops don'tTom Yu1994-07-163-2/+13
| | | | | | | | | | bomb if val->tr_contents.dlength == 0 * asn1_decode_k.c (asn1_decode_encrypted_data): oops looks like Harry made a brain fart here.... default value for kvno was 5, not 0. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3995 dc483132-0cff-0310-8789-dd5450dbe970
* Added MIT Copyright noticesTheodore Tso1994-07-1419-0/+419
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3973 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode_k.c (asn1_encode_pa_data): oops still check NULL ifTom Yu1994-07-142-1/+7
| | | | | | length != 0 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3970 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode_k.c (asn1_encode_pa_data): the contents field of aTom Yu1994-07-092-1/+8
| | | | | | | | krb5_pa_data structure can be NULL (e.g. salt_type==KRB5_KDB_SALTTYPE_V4), and the encoder was treating this as a missing required field git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3962 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_decode_k.c: yet another instance of the SunOS realloc bugTom Yu1994-07-093-9/+26
| | | | | | | * asn1buf.c: whee SunOS realloc of a NULL pointer returns NULL. sigh. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3961 dc483132-0cff-0310-8789-dd5450dbe970
* * an1buf.c: Harry saves vs. Unix again. Making sure that anythingTom Yu1994-07-072-2/+7
| | | | | | | | that can call calloc with a zero argument won't return ENOMEM if calloc retuns NULL in this case. This was prompted by breakage under linux. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3956 dc483132-0cff-0310-8789-dd5450dbe970
* Get rid of strftime (since it breaks when used this way, at least underMark Eichin1994-07-063-27/+18
| | | | | | | | | | Solaris, and many systems don't even have it) in generaltime encoder. Use gmt_mktime in generaltime decoder. With these changes, kinit works again under Solaris 2. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3953 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_encode_k.h:Tom Yu1994-07-034-3/+11
| | | | | | | | | * asn1buf.c: * krbasn1.h: punt stdlib.h in favor of stdio.h. It looks like Harry was assuming that NULL gets defined in stdlib instead of stdio git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3949 dc483132-0cff-0310-8789-dd5450dbe970
* revert portability change temporarilyMark Eichin1994-07-021-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3943 dc483132-0cff-0310-8789-dd5450dbe970
* make gmt_offset portable, make decls and defns consistent..Mark Eichin1994-07-013-16/+44
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3940 dc483132-0cff-0310-8789-dd5450dbe970