~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/asn1/a_strex.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 * project 2000.
4
4
 */
5
5
/* ====================================================================
6
 
 * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
 
6
 * Copyright (c) 2000-2004 The OpenSSL Project.  All rights reserved.
7
7
 *
8
8
 * Redistribution and use in source and binary forms, with or without
9
9
 * modification, are permitted provided that the following conditions
553
553
        if((type < 0) || (type > 30)) return -1;
554
554
        mbflag = tag2nbyte[type];
555
555
        if(mbflag == -1) return -1;
556
 
        mbflag |= MBSTRING_FLAG;
 
556
        if (mbflag == 0)
 
557
                mbflag = MBSTRING_UTF8;
 
558
        else if (mbflag == 4)
 
559
                mbflag = MBSTRING_UNIV;
 
560
        else            
 
561
                mbflag |= MBSTRING_FLAG;
557
562
        stmp.data = NULL;
558
563
        ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING);
559
564
        if(ret < 0) return ret;