t_crl.c (194206) | t_crl.c (215697) |
---|---|
1/* t_crl.c */ 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * project 1999. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 73 unchanged lines hidden (view full) --- 82 } 83#endif 84 85int X509_CRL_print(BIO *out, X509_CRL *x) 86{ 87 STACK_OF(X509_REVOKED) *rev; 88 X509_REVOKED *r; 89 long l; | 1/* t_crl.c */ 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * project 1999. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 73 unchanged lines hidden (view full) --- 82 } 83#endif 84 85int X509_CRL_print(BIO *out, X509_CRL *x) 86{ 87 STACK_OF(X509_REVOKED) *rev; 88 X509_REVOKED *r; 89 long l; |
90 int i, n; | 90 int i; |
91 char *p; 92 93 BIO_printf(out, "Certificate Revocation List (CRL):\n"); 94 l = X509_CRL_get_version(x); 95 BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l+1, l); 96 i = OBJ_obj2nid(x->sig_alg->algorithm); 97 BIO_printf(out, "%8sSignature Algorithm: %s\n", "", 98 (i == NID_undef) ? "NONE" : OBJ_nid2ln(i)); 99 p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0); 100 BIO_printf(out,"%8sIssuer: %s\n","",p); 101 OPENSSL_free(p); 102 BIO_printf(out,"%8sLast Update: ",""); 103 ASN1_TIME_print(out,X509_CRL_get_lastUpdate(x)); 104 BIO_printf(out,"\n%8sNext Update: ",""); 105 if (X509_CRL_get_nextUpdate(x)) 106 ASN1_TIME_print(out,X509_CRL_get_nextUpdate(x)); 107 else BIO_printf(out,"NONE"); 108 BIO_printf(out,"\n"); 109 | 91 char *p; 92 93 BIO_printf(out, "Certificate Revocation List (CRL):\n"); 94 l = X509_CRL_get_version(x); 95 BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l+1, l); 96 i = OBJ_obj2nid(x->sig_alg->algorithm); 97 BIO_printf(out, "%8sSignature Algorithm: %s\n", "", 98 (i == NID_undef) ? "NONE" : OBJ_nid2ln(i)); 99 p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0); 100 BIO_printf(out,"%8sIssuer: %s\n","",p); 101 OPENSSL_free(p); 102 BIO_printf(out,"%8sLast Update: ",""); 103 ASN1_TIME_print(out,X509_CRL_get_lastUpdate(x)); 104 BIO_printf(out,"\n%8sNext Update: ",""); 105 if (X509_CRL_get_nextUpdate(x)) 106 ASN1_TIME_print(out,X509_CRL_get_nextUpdate(x)); 107 else BIO_printf(out,"NONE"); 108 BIO_printf(out,"\n"); 109 |
110 n=X509_CRL_get_ext_count(x); | |
111 X509V3_extensions_print(out, "CRL extensions", 112 x->crl->extensions, 0, 8); 113 114 rev = X509_CRL_get_REVOKED(x); 115 116 if(sk_X509_REVOKED_num(rev) > 0) 117 BIO_printf(out, "Revoked Certificates:\n"); 118 else BIO_printf(out, "No Revoked Certificates.\n"); --- 16 unchanged lines hidden --- | 110 X509V3_extensions_print(out, "CRL extensions", 111 x->crl->extensions, 0, 8); 112 113 rev = X509_CRL_get_REVOKED(x); 114 115 if(sk_X509_REVOKED_num(rev) > 0) 116 BIO_printf(out, "Revoked Certificates:\n"); 117 else BIO_printf(out, "No Revoked Certificates.\n"); --- 16 unchanged lines hidden --- |