Make regen work even when someone has compilation errors
[hcoop/domtool2.git] / openssl / openssl_sml.c
index c475c30..fc82769 100644 (file)
@@ -196,21 +196,16 @@ int OpenSSL_SML_use_certificate_chain_file(SSL_CTX *ctx, char *keyfile) {
                                            keyfile);
 }
 
                                            keyfile);
 }
 
-static unsigned char subject[] = "Subject";
-
 const char *OpenSSL_SML_get_peer_name(SSL *ssl) {
   X509 *x = SSL_get_peer_certificate(ssl);
 const char *OpenSSL_SML_get_peer_name(SSL *ssl) {
   X509 *x = SSL_get_peer_certificate(ssl);
-  unsigned char *name = subject;
-  X509_NAME *nm;
 
   if (x) {
     X509_NAME *name = X509_get_subject_name(x);
 
     if (name) {
 
   if (x) {
     X509_NAME *name = X509_get_subject_name(x);
 
     if (name) {
-      unsigned char *out;
       X509_NAME_ENTRY *ne;
 
       X509_NAME_ENTRY *ne;
 
-      ne = X509_NAME_get_entry(name, 3);
+      ne = X509_NAME_get_entry(name, 0);
 
       if (ne) {
        ASN1_STRING *s = X509_NAME_ENTRY_get_data(ne);
 
       if (ne) {
        ASN1_STRING *s = X509_NAME_ENTRY_get_data(ne);
@@ -244,3 +239,7 @@ BIO *OpenSSL_SML_pop(BIO *b) {
 BIO *OpenSSL_SML_next(BIO *b) {
   return BIO_next(b);
 }
 BIO *OpenSSL_SML_next(BIO *b) {
   return BIO_next(b);
 }
+
+int OpenSSL_SML_puts(BIO *b, const char *buf) {
+  return BIO_puts(b, buf);
+}