You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2002/03/13 19:56:07 UTC
cvs commit: httpd-2.0/modules/ssl mod_ssl.h ssl_util.c
dougm 02/03/13 10:56:07
Modified: modules/ssl mod_ssl.h ssl_util.c
Log:
add ssl_asn1_keystr() util function that returns string representation
(RSA or DSA) of the key index.
Revision Changes Path
1.78 +2 -0 httpd-2.0/modules/ssl/mod_ssl.h
Index: mod_ssl.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/mod_ssl.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- mod_ssl.h 13 Mar 2002 18:42:05 -0000 1.77
+++ mod_ssl.h 13 Mar 2002 18:56:07 -0000 1.78
@@ -713,6 +713,8 @@
void ssl_asn1_table_unset(apr_hash_t *table,
const char *key);
+const char *ssl_asn1_keystr(int keytype);
+
const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
const char *id,
int keytype);
1.28 +12 -5 httpd-2.0/modules/ssl/ssl_util.c
Index: ssl_util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_util.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ssl_util.c 13 Mar 2002 18:42:05 -0000 1.27
+++ ssl_util.c 13 Mar 2002 18:56:07 -0000 1.28
@@ -375,17 +375,24 @@
static const char *ssl_asn1_key_types[] = {"RSA", "DSA"};
-const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
- const char *id,
- int keytype)
+const char *ssl_asn1_keystr(int keytype)
{
if (keytype >= SSL_AIDX_MAX) {
return NULL;
}
- return apr_pstrcat(p, id, ":",
- ssl_asn1_key_types[keytype], NULL);
+ return ssl_asn1_key_types[keytype];
}
+
+const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
+ const char *id,
+ int keytype)
+{
+ const char *keystr = ssl_asn1_keystr(keytype);
+
+ return apr_pstrcat(p, id, ":", keystr, NULL);
+}
+
#if APR_HAS_THREADS
/*