You need to create DSA key first and next set a value:

DSA * dsa = NULL; xmlSecKeyPtr key; int ret;

/* create DSA key */
dsa = .....

/* create xmlSecKey */
key = xmlSecKeyCreate(xmlSecDsaKey, xmlSecKeyOriginDefault);
if(key == NULL) {
fprintf(stderr, "Error: failed to create dsa key\n");
return(NULL);
} /* set value */
ret = xmlSecDsaKeyGenerate(key, dsa);
if(ret < 0) {
xmlSecKeyDestroy(key); fprintf(stderr, "Error: failed to set dsa key params\n");
return(NULL);
}
Aleksey



Meg Morgan wrote:

Oops forgot to send it to the list too..



------------------------------------------------------------------------

Subject:
Re: [xmlsec] Loading PEM keys from memory instead of a file
From:
Meg Morgan <[EMAIL PROTECTED]>
Date:
Fri, 24 Jan 2003 22:02:57 +0000
To:
Aleksey Sanin <[EMAIL PROTECTED]>


Hmm, xmlSecDsaKeyGenerate is returning -1 for me.
The console says:

<..\src\dsa.c:533>: error 100: assertion : key != NULL

Here's the input:

xmlSecKeyPtr key = NULL;
DSA * dsa = NULL;
char *passwd = "";
std::string prvkey_str;
int retval = 0;


_______________________________________________
xmlsec mailing list
[EMAIL PROTECTED]
http://www.aleksey.com/mailman/listinfo/xmlsec


Reply via email to