Skip to content

Instantly share code, notes, and snippets.

@elisehuard
Created December 15, 2009 14:02
Show Gist options
  • Save elisehuard/256952 to your computer and use it in GitHub Desktop.
Save elisehuard/256952 to your computer and use it in GitHub Desktop.
static VALUE
ossl_x509req_add_unstructuredName(VALUE self, VALUE name)
{
X509_REQ *req;
char* s;
GetX509Req(self,req);
s = StringValuePtr(name);
if (X509_REQ_add1_attr_by_NID(req, NID_pkcs9_unstructuredName,MBSTRING_ASC,s, -1) != 1) {
ossl_raise(eX509ReqError,NULL);
}
return name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment