When we revoke a certificate, we have the message "unable to
rename index.txt.new to index.txt".
The problem is on the return of "rename(buf[0],dbfile)" in
the ca.c file .

We have  :
        if (BIO_write_filename(out,buf[0]) <= 0)
        {
             perror(dbfile);
             BIO_printf(bio_err,"unable to open '%s'\n",dbfile);
             goto err;
        }
        j=TXT_DB_write(out,db);
        if (j <= 0) goto err;
        strncpy(buf[1],dbfile,BSIZE-4);
#ifndef OPENSSL_SYS_VMS
        strcat(buf[1],".old");
#else
        strcat(buf[1],"-old");
#endif
        if (rename(dbfile,buf[1]) < 0)
        {
            BIO_printf(bio_err,"unable to rename %s to %s\n",
dbfile, buf[1]);
            perror("reason");
            goto err;
        }

        if (rename(buf[0],dbfile) < 0)
        {
            BIO_printf(bio_err,"unable to rename %s to %s\n",
buf[0],dbfile);
            perror("reason");
            rename(buf[1],dbfile);
            goto err;
        }

When we add : BIO_free_all(out); out=NULL; 
before : rename(buf[0],dbfile)
all is ok

-- 
-------  Francoise LACAMBRE  ------------ BULL I&S ------
Tel : 01 30 80 77 51 (237 7751)         Rue Jean Jaures
Fax : 01 30 80 65 40 (237 6540)         78340 Les Clayes-sous-Bois
mailto:[EMAIL PROTECTED]      Poste Courrier : FRCL
P2/130
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to