Changeset 5410

Show
Ignore:
Timestamp:
03/15/08 09:39:10 (4 months ago)
Author:
morris
Message:

Save common name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/misc/wi-crypto.c

    r5402 r5410  
    6969         
    7070        X509                                                            *x509; 
     71         
     72        wi_string_t                                                     *common_name; 
    7173}; 
    7274 
     
    432434        BIGNUM                  *bn = NULL; 
    433435         
     436        x509->common_name = wi_retain(common_name); 
     437         
    434438        req = X509_REQ_new(); 
    435439         
     
    493497        if(X509_sign(x509->x509, pkey, EVP_sha1()) == 0) 
    494498                goto err; 
    495  
     499         
    496500        goto end; 
    497501         
     
    555559         
    556560        X509_free(x509->x509); 
     561         
     562        wi_release(x509->common_name); 
    557563} 
    558564 
     
    562568        wi_x509_t               *x509 = instance; 
    563569         
    564         return wi_string_with_format(WI_STR("<%@ %p>{x509 = %p}"), 
     570        return wi_string_with_format(WI_STR("<%@ %p>{x509 = %p, name = %@}"), 
    565571        wi_runtime_class_name(x509), 
    566572                x509, 
    567                 x509->x509); 
     573                x509->x509, 
     574                x509->common_name); 
    568575} 
    569576