Omit padding in RC4_KEY on IA-64. The idea behind padding was to reserve
[openssl.git] / ssl / ssl_txt.c
index 6e33eec3e4f7de3c0d862d1927d6038484759743..fd0c55c1270c23d7fe1384c7e8b906056ed1e954 100644 (file)
@@ -60,8 +60,8 @@
 #include <openssl/buffer.h>
 #include "ssl_locl.h"
 
-#ifndef NO_FP_API
-int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x)
+#ifndef OPENSSL_NO_FP_API
+int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x)
        {
        BIO *b;
        int ret;
@@ -78,10 +78,10 @@ int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x)
        }
 #endif
 
-int SSL_SESSION_print(BIO *bp, SSL_SESSION *x)
+int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
        {
        unsigned int i;
-       char *s;
+       const char *s;
 
        if (x == NULL) goto err;
        if (BIO_puts(bp,"SSL-Session:\n") <= 0) goto err;
@@ -139,6 +139,18 @@ int SSL_SESSION_print(BIO *bp, SSL_SESSION *x)
                        {
                        if (BIO_printf(bp,"%02X",x->key_arg[i]) <= 0) goto err;
                        }
+#ifndef OPENSSL_NO_KRB5
+       if (BIO_puts(bp,"\n    Krb5 Principal: ") <= 0) goto err;
+            if (x->krb5_client_princ_len == 0)
+            {
+               if (BIO_puts(bp,"None") <= 0) goto err;
+               }
+       else
+               for (i=0; i<x->krb5_client_princ_len; i++)
+                       {
+                       if (BIO_printf(bp,"%02X",x->krb5_client_princ[i]) <= 0) goto err;
+                       }
+#endif /* OPENSSL_NO_KRB5 */
        if (x->compress_meth != 0)
                {
                SSL_COMP *comp;