merging changes from portability branch back to trunk
important change for developers: %Y replaces %D to print identities!
This commit is contained in:
@@ -311,7 +311,7 @@ static bool verify(private_gmp_rsa_public_key_t *this, signature_scheme_t scheme
|
||||
/**
|
||||
* Implementation of public_key_t.get_keysize.
|
||||
*/
|
||||
static bool encrypt(private_gmp_rsa_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
static bool encrypt_(private_gmp_rsa_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
{
|
||||
DBG1("RSA public key encryption not implemented");
|
||||
return FALSE;
|
||||
@@ -385,7 +385,7 @@ static private_gmp_rsa_public_key_t *gmp_rsa_public_key_create_empty()
|
||||
|
||||
this->public.interface.get_type = (key_type_t (*)(public_key_t *this))get_type;
|
||||
this->public.interface.verify = (bool (*)(public_key_t *this, signature_scheme_t scheme, chunk_t data, chunk_t signature))verify;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt_;
|
||||
this->public.interface.get_keysize = (size_t (*) (public_key_t *this))get_keysize;
|
||||
this->public.interface.get_id = (identification_t* (*) (public_key_t *this,id_type_t))get_id;
|
||||
this->public.interface.get_encoding = (chunk_t(*)(public_key_t*))get_encoding;
|
||||
|
||||
@@ -178,7 +178,7 @@ static bool verify(private_openssl_ec_public_key_t *this, signature_scheme_t sch
|
||||
/**
|
||||
* Implementation of public_key_t.get_keysize.
|
||||
*/
|
||||
static bool encrypt(private_openssl_ec_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
static bool encrypt_(private_openssl_ec_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
{
|
||||
DBG1("EC public key encryption not implemented");
|
||||
return FALSE;
|
||||
@@ -279,7 +279,7 @@ static private_openssl_ec_public_key_t *openssl_ec_public_key_create_empty()
|
||||
|
||||
this->public.interface.get_type = (key_type_t (*)(public_key_t *this))get_type;
|
||||
this->public.interface.verify = (bool (*)(public_key_t *this, signature_scheme_t scheme, chunk_t data, chunk_t signature))verify;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt_;
|
||||
this->public.interface.get_keysize = (size_t (*) (public_key_t *this))get_keysize;
|
||||
this->public.interface.get_id = (identification_t* (*) (public_key_t *this,id_type_t))get_id;
|
||||
this->public.interface.get_encoding = (chunk_t(*)(public_key_t*))get_encoding;
|
||||
|
||||
@@ -147,7 +147,7 @@ static bool verify(private_openssl_rsa_public_key_t *this, signature_scheme_t sc
|
||||
/**
|
||||
* Implementation of public_key_t.get_keysize.
|
||||
*/
|
||||
static bool encrypt(private_openssl_rsa_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
static bool encrypt_(private_openssl_rsa_public_key_t *this, chunk_t crypto, chunk_t *plain)
|
||||
{
|
||||
DBG1("RSA public key encryption not implemented");
|
||||
return FALSE;
|
||||
@@ -263,7 +263,7 @@ static private_openssl_rsa_public_key_t *openssl_rsa_public_key_create_empty()
|
||||
|
||||
this->public.interface.get_type = (key_type_t (*)(public_key_t *this))get_type;
|
||||
this->public.interface.verify = (bool (*)(public_key_t *this, signature_scheme_t scheme, chunk_t data, chunk_t signature))verify;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt;
|
||||
this->public.interface.encrypt = (bool (*)(public_key_t *this, chunk_t crypto, chunk_t *plain))encrypt_;
|
||||
this->public.interface.get_keysize = (size_t (*) (public_key_t *this))get_keysize;
|
||||
this->public.interface.get_id = (identification_t* (*) (public_key_t *this,id_type_t))get_id;
|
||||
this->public.interface.get_encoding = (chunk_t(*)(public_key_t*))get_encoding;
|
||||
|
||||
@@ -353,7 +353,7 @@ static identification_t *parse_generalName(chunk_t blob, int level0)
|
||||
if (id_type != ID_ANY)
|
||||
{
|
||||
gn = identification_create_from_encoding(id_type, object);
|
||||
DBG2(" '%D'", gn);
|
||||
DBG2(" '%Y'", gn);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@@ -510,9 +510,9 @@ static void parse_authorityInfoAccess(chunk_t blob, int level0,
|
||||
/* parsing went wrong - abort */
|
||||
goto end;
|
||||
}
|
||||
DBG2(" '%D'", id);
|
||||
DBG2(" '%Y'", id);
|
||||
if (accessMethod == OID_OCSP &&
|
||||
asprintf(&uri, "%D", id) > 0)
|
||||
asprintf(&uri, "%Y", id) > 0)
|
||||
{
|
||||
this->ocsp_uris->insert_last(this->ocsp_uris, uri);
|
||||
}
|
||||
@@ -619,7 +619,7 @@ static void parse_crlDistributionPoints(chunk_t blob, int level0,
|
||||
{
|
||||
char *uri;
|
||||
|
||||
if (asprintf(&uri, "%D", id) > 0)
|
||||
if (asprintf(&uri, "%Y", id) > 0)
|
||||
{
|
||||
this->crl_uris->insert_last(this->crl_uris, uri);
|
||||
}
|
||||
@@ -714,7 +714,7 @@ static bool parse_certificate(private_x509_cert_t *this)
|
||||
break;
|
||||
case X509_OBJ_ISSUER:
|
||||
this->issuer = identification_create_from_encoding(ID_DER_ASN1_DN, object);
|
||||
DBG2(" '%D'", this->issuer);
|
||||
DBG2(" '%Y'", this->issuer);
|
||||
break;
|
||||
case X509_OBJ_NOT_BEFORE:
|
||||
this->notBefore = asn1_parse_time(object, level);
|
||||
@@ -724,7 +724,7 @@ static bool parse_certificate(private_x509_cert_t *this)
|
||||
break;
|
||||
case X509_OBJ_SUBJECT:
|
||||
this->subject = identification_create_from_encoding(ID_DER_ASN1_DN, object);
|
||||
DBG2(" '%D'", this->subject);
|
||||
DBG2(" '%Y'", this->subject);
|
||||
break;
|
||||
case X509_OBJ_SUBJECT_PUBLIC_KEY_INFO:
|
||||
this->public_key = lib->creds->create(lib->creds, CRED_PUBLIC_KEY,
|
||||
|
||||
@@ -226,7 +226,7 @@ static bool parse(private_x509_crl_t *this)
|
||||
break;
|
||||
case CRL_OBJ_ISSUER:
|
||||
this->issuer = identification_create_from_encoding(ID_DER_ASN1_DN, object);
|
||||
DBG2(" '%D'", this->issuer);
|
||||
DBG2(" '%Y'", this->issuer);
|
||||
break;
|
||||
case CRL_OBJ_THIS_UPDATE:
|
||||
this->thisUpdate = asn1_parse_time(object, level);
|
||||
|
||||
@@ -523,12 +523,12 @@ static bool parse_basicOCSPResponse(private_x509_ocsp_response_t *this,
|
||||
case BASIC_RESPONSE_ID_BY_NAME:
|
||||
this->responderId = identification_create_from_encoding(
|
||||
ID_DER_ASN1_DN, object);
|
||||
DBG2(" '%D'", this->responderId);
|
||||
DBG2(" '%Y'", this->responderId);
|
||||
break;
|
||||
case BASIC_RESPONSE_ID_BY_KEY:
|
||||
this->responderId = identification_create_from_encoding(
|
||||
ID_PUBKEY_INFO_SHA1, object);
|
||||
DBG2(" '%D'", this->responderId);
|
||||
DBG2(" '%Y'", this->responderId);
|
||||
break;
|
||||
case BASIC_RESPONSE_PRODUCED_AT:
|
||||
this->producedAt = asn1_to_time(&object, ASN1_GENERALIZEDTIME);
|
||||
|
||||
Reference in New Issue
Block a user