(hx509_ca_tbs_add_san_jid): Allow adding id-pkix-on-xmppAddr OtherName.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19861 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -282,6 +282,37 @@ out:
 | 
				
			|||||||
    return ret;
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					int
 | 
				
			||||||
 | 
					hx509_ca_tbs_add_san_jid(hx509_context context,
 | 
				
			||||||
 | 
								 hx509_ca_tbs tbs,
 | 
				
			||||||
 | 
								 const char *jid)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    const PKIXXmppAddr ujid = (const PKIXXmppAddr)jid;
 | 
				
			||||||
 | 
					    heim_octet_string os;
 | 
				
			||||||
 | 
					    size_t size;
 | 
				
			||||||
 | 
					    int ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    os.length = 0;
 | 
				
			||||||
 | 
					    os.data = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ASN1_MALLOC_ENCODE(PKIXXmppAddr, os.data, os.length, &ujid, &size, ret);
 | 
				
			||||||
 | 
					    if (ret) {
 | 
				
			||||||
 | 
						hx509_set_error_string(context, 0, ret, "Out of memory");
 | 
				
			||||||
 | 
						goto out;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    if (size != os.length)
 | 
				
			||||||
 | 
						_hx509_abort("internal ASN.1 encoder error");
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    ret = hx509_ca_tbs_add_san_otherName(context,
 | 
				
			||||||
 | 
										 tbs,
 | 
				
			||||||
 | 
										 oid_id_pkix_on_xmppAddr(),
 | 
				
			||||||
 | 
										 &os);
 | 
				
			||||||
 | 
					    free(os.data);
 | 
				
			||||||
 | 
					out:
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
hx509_ca_tbs_add_san_hostname(hx509_context context,
 | 
					hx509_ca_tbs_add_san_hostname(hx509_context context,
 | 
				
			||||||
			      hx509_ca_tbs tbs,
 | 
								      hx509_ca_tbs tbs,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user