- idx=0;
- l=0;
- while (idx < a->length)
- {
- l|=(p[idx]&0x7f);
- if (!(p[idx] & 0x80)) break;
- l<<=7L;
- idx++;
- }
- idx++;
- i=(int)(l/40);
- if (i > 2) i=2;
- l-=(long)(i*40);
-
- sprintf(tbuf,"%d.%ld",i,l);
- i=strlen(tbuf);
- strncpy(buf,tbuf,buf_len);
- buf_len-=i;
- buf+=i;
- n+=i;
-
- l=0;
- for (; idx<len; idx++)
- {
- l|=p[idx]&0x7f;
- if (!(p[idx] & 0x80))
- {
- sprintf(tbuf,".%ld",l);
- i=strlen(tbuf);
- if (buf_len > 0)
- strncpy(buf,tbuf,buf_len);
- buf_len-=i;
- buf+=i;
- n+=i;
- l=0;
- }
- l<<=7L;
- }
- }
- else
- {
- s=(char *)OBJ_nid2ln(nid);
- if (s == NULL)
- s=(char *)OBJ_nid2sn(nid);
- strncpy(buf,s,buf_len);
- n=strlen(s);
- }
- buf[buf_len-1]='\0';
- return(n);
- }
-
-int i2a_ASN1_OBJECT(bp,a)
-BIO *bp;
-ASN1_OBJECT *a;