@@ -369,7 +369,7 @@ int callback_public_keys(test_certs_t *objects,
369
369
OSSL_PARAM_BLD * bld = NULL ;
370
370
#endif
371
371
372
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
372
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
373
373
374
374
375
375
/* Search for already stored certificate with same ID */
@@ -387,7 +387,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
387
387
return -1 ;
388
388
}
389
389
390
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
390
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
391
391
392
392
o -> public_handle = object_handle ;
393
393
o -> verify = (template [0 ].ulValueLen == sizeof (CK_BBOOL ))
@@ -402,7 +402,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
402
402
o -> derive_pub = (template [9 ].ulValueLen == sizeof (CK_BBOOL ))
403
403
? * ((CK_BBOOL * ) template [9 ].pValue ) : CK_FALSE ;
404
404
405
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
405
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
406
406
407
407
/* check if we get the same public key as from the certificate */
408
408
if (o -> key_type == CKK_RSA ) {
@@ -508,7 +508,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
508
508
EC_POINT * cert_point = NULL ;
509
509
#endif
510
510
511
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
511
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
512
512
513
513
/* Parse the nid out of the EC_PARAMS */
514
514
p = template [6 ].pValue ;
@@ -525,7 +525,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
525
525
" to NID" , o -> id_str );
526
526
goto ec_out ;
527
527
}
528
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
528
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
529
529
530
530
ecgroup = EC_GROUP_new_by_curve_name (nid );
531
531
if (ecgroup == NULL ) {
@@ -535,14 +535,14 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
535
535
}
536
536
EC_GROUP_set_asn1_flag (ecgroup , OPENSSL_EC_NAMED_CURVE );
537
537
538
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
538
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
539
539
540
540
p = template [7 ].pValue ;
541
541
pub_asn1 = d2i_ASN1_OCTET_STRING (NULL , & p , template [7 ].ulValueLen );
542
542
pub = ASN1_STRING_get0_data (pub_asn1 );
543
543
pub_len = ASN1_STRING_length (pub_asn1 );
544
544
545
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
545
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
546
546
547
547
if (!(ecpoint = EC_POINT_new (ecgroup ))) {
548
548
debug_print (" [WARN %s ] Cannot allocate EC_POINT" , o -> id_str );
@@ -566,7 +566,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
566
566
unsigned char pubkey [256 ];
567
567
size_t pubkey_len = 0 ;
568
568
int cert_nid = 0 ;
569
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
569
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
570
570
571
571
if (EVP_PKEY_get_group_name (o -> key , curve_name , sizeof (curve_name ), & curve_name_len ) != 1 ||
572
572
(cert_nid = OBJ_txt2nid (curve_name )) == NID_undef ||
@@ -590,7 +590,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
590
590
o -> id_str );
591
591
goto ec_out ;
592
592
}
593
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
593
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
594
594
595
595
o -> verify_public = 1 ;
596
596
} else { /* store the public key for future use */
@@ -606,7 +606,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
606
606
#else
607
607
ctx = EVP_PKEY_CTX_new_from_name (0 , "EC" , 0 );
608
608
609
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
609
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
610
610
611
611
const char * curve_name = OBJ_nid2sn (nid );
612
612
if (!(bld = OSSL_PARAM_BLD_new ()) ||
@@ -640,7 +640,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
640
640
EC_POINT_free (cert_point );
641
641
#endif
642
642
643
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
643
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
644
644
645
645
if (ec_error ) {
646
646
debug_print (" [WARN %s ] Failed to check EC public key" , o -> id_str );
@@ -656,7 +656,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
656
656
ASN1_OCTET_STRING * os ;
657
657
int evp_type ;
658
658
659
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
659
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
660
660
661
661
a = template [6 ].pValue ;
662
662
if (d2i_ASN1_PRINTABLESTRING (& curve , & a , (long )template [6 ].ulValueLen ) != NULL ) {
@@ -719,7 +719,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
719
719
return -1 ;
720
720
}
721
721
722
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
722
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
723
723
724
724
/* PKCS#11-compliant modules should return ASN1_OCTET_STRING */
725
725
a = template [7 ].pValue ;
@@ -728,31 +728,31 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
728
728
debug_print (" [WARN %s ] Cannot decode EC_POINT" , o -> id_str );
729
729
return -1 ;
730
730
}
731
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
731
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
732
732
733
733
if (os -> length != 32 ) {
734
734
debug_print (" [WARN %s ] Invalid length of EC_POINT value" , o -> id_str );
735
735
return -1 ;
736
736
}
737
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
737
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
738
738
739
739
key = EVP_PKEY_new_raw_public_key (evp_type , NULL ,
740
740
(const uint8_t * )os -> data ,
741
741
os -> length );
742
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
742
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
743
743
744
744
if (key == NULL ) {
745
745
debug_print (" [WARN %s ] Out of memory" , o -> id_str );
746
746
ASN1_STRING_free (os );
747
747
return -1 ;
748
748
}
749
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
749
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
750
750
751
751
if (o -> key != NULL ) {
752
752
unsigned char * pub = NULL ;
753
753
size_t publen = 0 ;
754
754
755
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
755
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
756
756
757
757
/* TODO check EVP_PKEY type */
758
758
@@ -768,7 +768,7 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
768
768
return -1 ;
769
769
}
770
770
771
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
771
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
772
772
773
773
if (EVP_PKEY_get_raw_public_key (o -> key , pub , & publen ) != 1 ||
774
774
publen != (size_t )os -> length ||
@@ -783,29 +783,29 @@ debug_print(" [ OK %s ] at %d", __FILE__, __LINE__);
783
783
free (pub );
784
784
EVP_PKEY_free (key );
785
785
o -> verify_public = 1 ;
786
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
786
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
787
787
788
788
} else { /* store the public key for future use */
789
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
789
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
790
790
791
791
o -> type = evp_type ;
792
792
o -> key = key ;
793
793
o -> bits = 255 ;
794
794
}
795
795
ASN1_STRING_free (os );
796
796
} else {
797
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
797
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
798
798
799
799
debug_print (" [WARN %s ] unknown key. Key type: %02lX" ,
800
800
o -> id_str , o -> key_type );
801
801
return -1 ;
802
802
}
803
803
804
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
804
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
805
805
806
806
add_supported_mechs (o );
807
807
808
- debug_print (" [ OK %s ] at %d" , __FILE__ , __LINE__ );
808
+ debug_print (" [ OK %s ] at %s:% d" , o -> id_str , __FILE__ , __LINE__ );
809
809
810
810
debug_print (" [ OK %s ] Public key loaded successfully V:%d E:%d T:%02lX" ,
811
811
o -> id_str , o -> verify , o -> encrypt , o -> key_type );
0 commit comments