Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7742779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:21:47+00:00 2026-06-01T09:21:47+00:00

How do I print the value stored in BIO object time. Basically I need

  • 0

How do I print the value stored in BIO object “time”. Basically I need to extract signed time.

ASN1_TYPE *asn1obj;         
if (!(asn1obj = PKCS7_get_signed_attribute(si, NID_pkcs9_signingTime))) {
    NSLog(@"Failed to retireve the signing time");
}else{
    if (asn1obj->type == V_ASN1_UTCTIME) {
        BIO * time = data=BIO_new(BIO_s_bio());
        i = ASN1_UTCTIME_print(time,asn1obj->value.utctime);
        NSLog(@"return value from ASN1_UTCTIME_print %d ",i);                   
    }
}

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:21:48+00:00Added an answer on June 1, 2026 at 9:21 am

    This is how it get working

    if (asn1obj->type == V_ASN1_UTCTIME) {
    
        NSLog(@"--------------------------->Retireve the signing time");
        BIO * time = data=BIO_new(BIO_s_bio());                  
    
        BIO_printf(bio_out,"\n");
    
        i = ASN1_UTCTIME_print(bio_out,asn1obj->value.utctime);   //used to display in console
        i = ASN1_UTCTIME_print(time,asn1obj->value.utctime);      //used to hold in BIO object
    
        BIO_printf(bio_out,"\n");
    
        BIO *mem = BIO_new(BIO_s_mem());              
        //pass this mem BIO to hold the data
        i = ASN1_UTCTIME_print(mem,asn1obj->value.utctime);       //converting asn1 to memory BIO
    
        //Extract the BUF_MEM structure from a memory BIO and then free up the BIO:
    
        BUF_MEM *bptr;
        BIO_get_mem_ptr(mem, &bptr);                  //converting memory BIO to BUF_MEM
        BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */
    
        char *buff = (char *)malloc(bptr->length);        //converting BUF_MEM  to Char * 
        memcpy(buff, bptr->data, bptr->length-1);         //to be used later
        buff[bptr->length-1] = 0;
    
        NSLog(@"--------------------------->%s",buff);        // this is my 
                                      // OUTPUT : Apr  5 14:30:53 2012 GM
    
        NSLog(@"--------------------------->End");
        BIO_free_all(mem);              
    }
    

    Hope this helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I print a signed integer value stored in an 8-bit register declared
I need to print the ASCII value of the given character in awk only.
How to print a value in the text box from the text file? Using
How to ignore if array(0) is null php When i am print the value
The first print shows the member value to be false, and the other two
Is there a way to print both key and value of a anonymous dict
I want to print the entire element including tag name, attribute name/value pairs and
I have a problem with getting some html value stored in a php array:
I have the following already decoded json stored in $response = $result->response; : object(stdClass)#6
I read values from an local Access mdb-file. One value is stored as string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.